Skip to content

Commit 5b14bda

Browse files
authored
Merge pull request #1021 from WordPress/feature/phpunit-add-clover-coverage-config
2 parents d6b5f8e + f645fb6 commit 5b14bda

3 files changed

Lines changed: 5 additions & 3 deletions

File tree

.github/workflows/test.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -123,11 +123,11 @@ jobs:
123123

124124
- name: Run the unit tests with code coverage (PHPUnit < 10)
125125
if: ${{ matrix.coverage == true && ! startsWith( steps.phpunit_version.outputs.VERSION, '10.' ) }}
126-
run: composer coverage -- --coverage-clover clover.xml
126+
run: composer coverage
127127

128128
- name: Run the unit tests with code coverage (PHPUnit 10+)
129129
if: ${{ matrix.coverage == true && startsWith( steps.phpunit_version.outputs.VERSION, '10.' ) }}
130-
run: composer coverage10 -- --coverage-clover clover.xml
130+
run: composer coverage10
131131

132132
- name: Stop proxy server
133133
continue-on-error: true
@@ -144,6 +144,6 @@ jobs:
144144
uses: codecov/codecov-action@671740ac38dd9b0130fbe1cec585b89eea48d3de # v5.5.2
145145
with:
146146
token: "${{ secrets.CODECOV_TOKEN }}"
147-
files: ./clover.xml
147+
files: ./tests/coverage/clover.xml
148148
fail_ci_if_error: true
149149
verbose: true

phpunit.xml.dist

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@
1717

1818
<logging>
1919
<log type="coverage-html" target="tests/coverage" lowUpperBound="35" highLowerBound="90"/>
20+
<log type="coverage-clover" target="tests/coverage/clover.xml"/>
2021
</logging>
2122

2223
<filter>

phpunit10.xml.dist

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@
3131
<coverage includeUncoveredFiles="true" ignoreDeprecatedCodeUnits="true">
3232
<report>
3333
<html outputDirectory="tests/coverage" lowUpperBound="35" highLowerBound="90"/>
34+
<clover outputFile="tests/coverage/clover.xml"/>
3435
</report>
3536
</coverage>
3637
</phpunit>

0 commit comments

Comments
 (0)