@@ -294,37 +294,26 @@ jobs:
294294 if : ${{ steps.phpunit_version.outputs.VERSION >= '9.3' }}
295295 run : php "vendor/bin/phpunit" --coverage-cache ./build/phpunit-cache --warm-coverage-cache
296296
297- - name : " Run the unit tests with code coverage (PHPUnit < 9.3)"
298- if : ${{ matrix.os != 'windows-latest' && steps.phpunit_version.outputs.VERSION < '9.3' }}
299- run : php "vendor/bin/phpunit"
300-
301- - name : " Run the unit tests with code coverage (PHPUnit 9.3+)"
302- if : ${{ matrix.os != 'windows-latest' && steps.phpunit_version.outputs.VERSION >= '9.3' }}
303- run : php "vendor/bin/phpunit" --coverage-cache ./build/phpunit-cache
304-
305- - name : " Run select tests in CBF mode with code coverage (PHPUnit < 9.3)"
306- if : ${{ matrix.os != 'windows-latest' && steps.phpunit_version.outputs.VERSION < '9.3' }}
297+ - name : " Run the unit tests with code coverage"
298+ if : ${{ matrix.os != 'windows-latest' }}
307299 run : >
308- php "vendor/bin/phpunit" tests/AllTests.php
309- --group CBF --exclude-group nothing --coverage-clover build/logs/clover-cbf.xml
310- env :
311- PHP_CODESNIFFER_CBF : ' 1'
300+ php "vendor/bin/phpunit"
301+ ${{ steps.phpunit_version.outputs.VERSION >= '9.3' && '--coverage-cache ./build/phpunit-cache' || '' }}
312302
313- - name : " Run select tests in CBF mode with code coverage (PHPUnit 9.3+) "
314- if : ${{ matrix.os != 'windows-latest' && steps.phpunit_version.outputs.VERSION >= '9.3' }}
303+ - name : " Run select tests in CBF mode with code coverage"
304+ if : ${{ matrix.os != 'windows-latest' }}
315305 run : >
316- php "vendor/bin/phpunit" tests/AllTests.php --coverage-cache ./build/phpunit-cache
306+ php "vendor/bin/phpunit"
307+ ${{ steps.phpunit_version.outputs.VERSION >= '9.3' && '--coverage-cache ./build/phpunit-cache' || '' }}
317308 --group CBF --exclude-group nothing --coverage-clover build/logs/clover-cbf.xml
318309 env :
319310 PHP_CODESNIFFER_CBF : ' 1'
320311
321- - name : " Run the unit tests which may have different outcomes on Windows with code coverage (PHPUnit < 9.3)"
322- if : ${{ matrix.os == 'windows-latest' && steps.phpunit_version.outputs.VERSION < '9.3' }}
323- run : php "vendor/bin/phpunit" --group Windows
324-
325- - name : " Run the unit tests which may have different outcomes on Windows with code coverage (PHPUnit 9.3+)"
326- if : ${{ matrix.os == 'windows-latest' && steps.phpunit_version.outputs.VERSION >= '9.3' }}
327- run : php "vendor/bin/phpunit" --group Windows --coverage-cache ./build/phpunit-cache
312+ - name : " Run the unit tests which may have different outcomes on Windows with code coverage"
313+ if : ${{ matrix.os == 'windows-latest' }}
314+ run : >
315+ php "vendor/bin/phpunit" --group Windows
316+ ${{ steps.phpunit_version.outputs.VERSION >= '9.3' && '--coverage-cache ./build/phpunit-cache' || '' }}
328317
329318 - name : " Upload coverage results to Coveralls (normal run)"
330319 if : ${{ success() }}
0 commit comments