Skip to content

Commit 3687340

Browse files
committed
Coverage for unit test too
1 parent 240d91c commit 3687340

File tree

1 file changed

+17
-1
lines changed

1 file changed

+17
-1
lines changed

.github/workflows/testing.yml

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -96,6 +96,9 @@ jobs:
9696
strategy:
9797
matrix:
9898
php: [ '8.2' ]
99+
include:
100+
- php: '8.3'
101+
coverage: true
99102
runs-on: ubuntu-latest
100103

101104
steps:
@@ -133,4 +136,17 @@ jobs:
133136
run: echo "::add-matcher::${{ runner.tool_cache }}/phpunit.json"
134137

135138
- name: Run PHPUnit
136-
run: composer phpunit
139+
run: |
140+
if [[ ${{ matrix.coverage == true }} == true ]]; then
141+
composer phpunit -- --coverage-clover build/logs/unit-coverage.xml
142+
else
143+
composer phpunit
144+
fi
145+
146+
- name: Upload code coverage report
147+
if: ${{ matrix.coverage }}
148+
uses: codecov/codecov-action@v5.4.0
149+
with:
150+
directory: build/logs
151+
flags: unit
152+
token: ${{ secrets.CODECOV_TOKEN }}

0 commit comments

Comments
 (0)