diff --git a/.github/workflows/unit-tests.yml b/.github/workflows/unit-tests.yml
index ed8c22b..85d91ee 100644
--- a/.github/workflows/unit-tests.yml
+++ b/.github/workflows/unit-tests.yml
@@ -40,4 +40,14 @@ jobs:
composer-options: --ignore-platform-reqs
- name: Run tests
- run: composer run phpunit -- --coverage-text
+ run: composer run phpunit -- --coverage-clover .phpunit.cache/clover.xml
+
+ - name: Upload coverage reports to Codecov
+ if: ${{ success() && matrix.php == '8.2' }}
+ uses: codecov/codecov-action@v3
+ env:
+ CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
+ with:
+ files: ./.phpunit.cache/clover.xml
+ fail_ci_if_error: true
+ verbose: true
diff --git a/README.md b/README.md
index e200ed8..1325e1a 100644
--- a/README.md
+++ b/README.md
@@ -3,6 +3,7 @@
[![Latest Version](https://img.shields.io/github/release/Art4/json-api-client.svg)](https://github.com/Art4/json-api-client/releases)
[![Software License](https://img.shields.io/badge/license-GPL3-brightgreen.svg)](LICENSE)
[![Build Status](https://github.com/art4/json-api-client/actions/workflows/unit-tests.yml/badge.svg?branch=v1.x)](https://github.com/Art4/json-api-client/actions)
+[![codecov](https://codecov.io/gh/Art4/json-api-client/graph/badge.svg?token=5oNNDEUWgZ)](https://codecov.io/gh/Art4/json-api-client)
[![Total Downloads](https://img.shields.io/packagist/dt/art4/json-api-client.svg)](https://packagist.org/packages/art4/json-api-client)
JsonApiClient :construction_worker_woman: is a PHP Library to validate and handle the response body from a [JSON API](http://jsonapi.org) Server.
diff --git a/phpunit.xml b/phpunit.xml
index 03c0f13..002a138 100644
--- a/phpunit.xml
+++ b/phpunit.xml
@@ -19,12 +19,6 @@
tests/Functional/
tests/BC/
-
- tests/Unit/
-
-
- tests/Functional/
-