@@ -24,20 +24,57 @@ concurrency:
2424
2525jobs :
2626 tests :
27- name : " Tests"
27+ name : " Tests PHPUnit 12.x "
2828 runs-on : ${{ matrix.operating-system }}
2929 timeout-minutes : 60
3030
3131 strategy :
3232 fail-fast : false
3333 matrix :
3434 php-version :
35- - " 8.2"
3635 - " 8.3"
3736 - " 8.4"
3837 - " 8.5"
3938 operating-system : [ ubuntu-latest, windows-latest ]
4039
40+ steps :
41+ - name : " Checkout"
42+ uses : actions/checkout@v4
43+
44+ - name : " Install PHP"
45+ uses : " shivammathur/setup-php@v2"
46+ with :
47+ coverage : " none"
48+ php-version : " ${{ matrix.php-version }}"
49+ tools : pecl
50+ extensions : ds,mbstring
51+ ini-file : development
52+ ini-values : memory_limit=-1
53+
54+ - name : " Upgrade PHPUnit 12"
55+ shell : bash
56+ run : |
57+ composer require --dev phpunit/phpunit:^12 brianium/paratest:^7.16 symfony/process:^7 symfony/string:^7 symfony/console:^7 --update-with-dependencies --ignore-platform-reqs --working-dir=tests
58+ composer require --dev phpunit/phpunit:^12 sebastian/diff --update-with-dependencies --ignore-platform-reqs
59+
60+ - name : " Check PHP configuration"
61+ run : " vendor/bin/phpunit --check-php-configuration"
62+
63+ - name : " Tests"
64+ run : " php tests/vendor/bin/paratest --runner WrapperRunner --no-coverage"
65+
66+ tests-phpunit11 :
67+ name : " Tests PHPUnit 11.x"
68+ runs-on : ${{ matrix.operating-system }}
69+ timeout-minutes : 60
70+
71+ strategy :
72+ fail-fast : false
73+ matrix :
74+ php-version :
75+ - " 8.2"
76+ operating-system : [ ubuntu-latest, windows-latest ]
77+
4178 steps :
4279 - name : " Checkout"
4380 uses : actions/checkout@v4
@@ -208,7 +245,6 @@ jobs:
208245 fail-fast : false
209246 matrix :
210247 php-version :
211- - " 8.2"
212248 - " 8.3"
213249 - " 8.4"
214250 operating-system : [ubuntu-latest]
@@ -227,14 +263,20 @@ jobs:
227263 - uses : ./build-infection/.github/actions/setup-php
228264 with :
229265 php-version : " ${{ matrix.php-version }}"
230- extensions : ds,mbstring
266+ php- extensions : ds,mbstring
231267
232268 - uses : " ramsey/composer-install@v3"
233269
234270 - uses : " ramsey/composer-install@v3"
235271 with :
236272 working-directory : " tests/"
237273
274+ - name : " Upgrade PHPUnit with Paratest to speedup coverage generation"
275+ shell : bash
276+ run : |
277+ composer require --dev phpunit/phpunit:^12 brianium/paratest:^7.16 symfony/process:^7 symfony/string:^7 symfony/console:^7 --update-with-dependencies --ignore-platform-reqs --working-dir=tests
278+ composer require --dev phpunit/phpunit:^12 sebastian/diff --update-with-dependencies --ignore-platform-reqs
279+
238280 - uses : " ramsey/composer-install@v3"
239281 with :
240282 working-directory : " build-infection/"
@@ -266,6 +308,7 @@ jobs:
266308 php -d pcov.enabled=1 tests/vendor/bin/paratest \
267309 --passthru-php="'-d' 'pcov.enabled=1'" \
268310 --coverage-xml=tmp/coverage/coverage-xml --log-junit=tmp/coverage/junit.xml
311+ --exclude-source-from-xml-coverage
269312
270313 - name : " Run infection"
271314 run : |
0 commit comments