From 9fb03696ce2d1bbef53c385245bc7e3a69243259 Mon Sep 17 00:00:00 2001 From: Nick Ficano Date: Sun, 24 May 2026 21:22:08 -0400 Subject: [PATCH] ci: upload coverage to Codecov phpunit.xml already declares + pcov is enabled in the workflow. Emit Clover XML via --coverage-clover and upload it to Codecov non-blockingly. Requires CODECOV_TOKEN to be set as a repo secret. Co-Authored-By: Claude Opus 4.7 (1M context) --- .github/workflows/test.yml | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 9d3cdaf..2d5f3c8 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -73,8 +73,18 @@ jobs: if: hashFiles('.php-cs-fixer.dist.php', '.php-cs-fixer.php') != '' run: vendor/bin/php-cs-fixer fix --dry-run --diff - - name: Run PHPUnit - run: vendor/bin/phpunit + - name: Run PHPUnit (with Clover coverage) + run: vendor/bin/phpunit --coverage-clover=coverage.xml + + # Non-blocking: a Codecov outage cannot break CI. + - name: Upload coverage to Codecov + # codecov/codecov-action v6.0.1 + uses: codecov/codecov-action@e79a6962e0d4c0c17b229090214935d2e33f8354 # v6.0.1 + with: + fail_ci_if_error: false + flags: unittests + files: ./coverage.xml + token: ${{ secrets.CODECOV_TOKEN }} - name: Upload test artifacts on failure if: failure()