From 5c5d895635635d388b012416308fc6651a23d4f8 Mon Sep 17 00:00:00 2001 From: Rayan Levert Date: Fri, 1 Dec 2023 15:56:16 +0100 Subject: [PATCH 1/2] ci.yml : adding codecov to the actions --- .github/workflows/ci.yml | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 3545686..0f5d1e6 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -105,9 +105,15 @@ jobs: php-version: ${{ matrix.php-version }} extensions: mbstring tools: none + coverage: xdebug - name: Install dependencies with Composer run: composer install --no-ansi --no-interaction --no-progress - name: Run tests with PHPUnit - run: vendor/bin/phpunit \ No newline at end of file + run: vendor/bin/phpunit --coverage-clover coverage.xml + + - name: Upload coverage reports to Codecov + uses: codecov/codecov-action@v3 + env: + CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} \ No newline at end of file From adb78e95b92175a3cb6835bfbb1cba18f1b210d2 Mon Sep 17 00:00:00 2001 From: Rayan Levert Date: Fri, 1 Dec 2023 16:01:50 +0100 Subject: [PATCH 2/2] ci.yml : adding each version of PHP to the code coverage --- .github/workflows/ci.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 0f5d1e6..2470fdf 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -111,9 +111,11 @@ jobs: run: composer install --no-ansi --no-interaction --no-progress - name: Run tests with PHPUnit - run: vendor/bin/phpunit --coverage-clover coverage.xml + run: vendor/bin/phpunit --coverage-clover coverage-${{ matrix.php-version }}.xml - name: Upload coverage reports to Codecov uses: codecov/codecov-action@v3 + with: + files: coverage-*.xml env: CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} \ No newline at end of file