Skip to content

Commit 7d93dbe

Browse files
committed
Configure code coverage reporting
1 parent 2fb8ec8 commit 7d93dbe

File tree

2 files changed

+17
-2
lines changed

2 files changed

+17
-2
lines changed

.github/workflows/ci.yml

+16-2
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,22 @@ jobs:
2323

2424
- uses: php-actions/composer@v6 # or alternative dependency management
2525

26-
- name: Run PHPUnit
27-
run: vendor/bin/phpunit
26+
- name: PHPUnit Tests
27+
uses: php-actions/phpunit@v3
28+
env:
29+
XDEBUG_MODE: coverage
30+
with:
31+
php_extensions: xdebug
32+
args: tests --coverage-clover ./coverage.xml
33+
34+
- name: Upload to Codecov
35+
uses: codecov/codecov-action@v2
36+
with:
37+
token: ${{ secrets.CODECOV_TOKEN }}
38+
files: ./coverage.xml
39+
verbose: true
40+
41+
2842
cs:
2943
name: Coding standards
3044
runs-on: ubuntu-latest

.gitignore

+1
Original file line numberDiff line numberDiff line change
@@ -14,3 +14,4 @@
1414
coverage
1515
coverage.txt
1616
.phpcs-cache
17+
coverage.xml

0 commit comments

Comments
 (0)