Skip to content

Commit cc54814

Browse files
committed
Use different phpunit config for coverage
1 parent d418fd4 commit cc54814

File tree

3 files changed

+52
-9
lines changed

3 files changed

+52
-9
lines changed

.github/workflows/ci.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,7 @@ jobs:
106106
run: |
107107
mkdir -p build/logs/phpunit
108108
if [ "$COVERAGE" = '1' ]; then
109-
vendor/bin/simple-phpunit --coverage-xml=build/logs/phpunit/coverage-xml --coverage-clover=build/logs/phpunit/clover.xml --log-junit=build/logs/phpunit/junit.xml
109+
vendor/bin/simple-phpunit --configuration=phpunit.coverage.xml.dist --coverage-xml=build/logs/phpunit/coverage-xml --coverage-clover=build/logs/phpunit/clover.xml --log-junit=build/logs/phpunit/junit.xml
110110
else
111111
vendor/bin/simple-phpunit --log-junit build/logs/phpunit/junit.xml
112112
fi
@@ -237,7 +237,7 @@ jobs:
237237
php:
238238
- '8.4'
239239
symfony:
240-
- '^7.2'
240+
- '^7.3'
241241
fail-fast: false
242242
timeout-minutes: 20
243243
steps:
@@ -292,7 +292,7 @@ jobs:
292292
php:
293293
- '8.4'
294294
symfony:
295-
- '^7.2'
295+
- '^7.3'
296296
fail-fast: false
297297
timeout-minutes: 20
298298
steps:

phpunit.coverage.xml.dist

Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<!-- https://phpunit.readthedocs.io/en/latest/configuration.html -->
3+
<phpunit
4+
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
5+
xsi:noNamespaceSchemaLocation="https://schema.phpunit.de/12.1/phpunit.xsd"
6+
bootstrap="tests/Functional/app/bootstrap.php"
7+
backupGlobals="false"
8+
colors="true"
9+
failOnWarning="false"
10+
failOnDeprecation="false">
11+
<source>
12+
<include>
13+
<directory suffix=".php">.</directory>
14+
</include>
15+
<exclude>
16+
<directory>tests</directory>
17+
<directory>features</directory>
18+
<directory>vendor</directory>
19+
<directory>src/Resources/config</directory>
20+
<directory>.php-cs-fixer.dist.php</directory>
21+
</exclude>
22+
</source>
23+
<coverage includeUncoveredFiles="true">
24+
<report>
25+
<clover outputFile="clover.xml"/>
26+
<xml outputDirectory="infection-coverage-xml"/>
27+
</report>
28+
</coverage>
29+
<php>
30+
<ini name="error_reporting" value="-1"/>
31+
<ini name="memory_limit" value="-1"/>
32+
<env name="SYMFONY_DEPRECATIONS_HELPER" value="baselineFile=./tests/allowed.json&amp;verbose=1"/>
33+
<server name="KERNEL_DIR" value="tests/Functional/app/"/>
34+
<server name="KERNEL_CLASS" value="AppKernel"/>
35+
<server name="APP_ENV" value="test" force="true"/>
36+
<server name="LEGACY" value="0"/>
37+
<server name="SHELL_VERBOSITY" value="-1"/>
38+
<server name="SYMFONY_PHPUNIT_REMOVE" value=""/>
39+
<server name="SYMFONY_PHPUNIT_VERSION" value="12.1"/>
40+
</php>
41+
<logging>
42+
<junit outputFile="/tmp/infection/phpunit.junit.xml"/>
43+
</logging>
44+
<testsuites>
45+
<testsuite name="Project Test Suite">
46+
<directory>tests</directory>
47+
</testsuite>
48+
</testsuites>
49+
</phpunit>

phpunit.xml.dist

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -20,12 +20,6 @@
2020
<directory>.php-cs-fixer.dist.php</directory>
2121
</exclude>
2222
</source>
23-
<coverage includeUncoveredFiles="true">
24-
<report>
25-
<clover outputFile="clover.xml"/>
26-
<xml outputDirectory="infection-coverage-xml"/>
27-
</report>
28-
</coverage>
2923
<php>
3024
<ini name="error_reporting" value="-1"/>
3125
<ini name="memory_limit" value="-1"/>

0 commit comments

Comments
 (0)