From 1381e9a489abf926df64347b0a2760d0238d59d6 Mon Sep 17 00:00:00 2001 From: Andrew Nicols Date: Tue, 1 Oct 2024 14:51:59 +0800 Subject: [PATCH] Configure code coverage reporting --- .github/workflows/ci.yml | 14 +++++++++++++- .gitignore | 1 + 2 files changed, 14 insertions(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 8d3ed01..c45f37d 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -23,8 +23,20 @@ jobs: - uses: php-actions/composer@v6 # or alternative dependency management + - name: Run PHPUnit - run: vendor/bin/phpunit + run: vendor/bin/phpunit --coverage-clover ./coverage.xml + env: + XDEBUG_MODE: coverage + + - name: Upload to Codecov + uses: codecov/codecov-action@v4 + with: + token: ${{ secrets.CODECOV_TOKEN }} + files: ./coverage.xml + verbose: true + + cs: name: Coding standards runs-on: ubuntu-latest diff --git a/.gitignore b/.gitignore index 529323a..999f612 100644 --- a/.gitignore +++ b/.gitignore @@ -14,3 +14,4 @@ coverage coverage.txt .phpcs-cache +coverage.xml