8888 # - custom_ini: Whether to run with specific custom ini settings to hit very specific
8989 # code conditions.
9090 matrix :
91+ os : ['ubuntu-latest', 'windows-latest']
9192 php : ['5.4', '5.5', '5.6', '7.0', '7.1', '7.2', '7.3', '7.4', '8.0', '8.1', '8.2', '8.3', '8.4', '8.5']
9293 custom_ini : [false]
9394
@@ -105,7 +106,7 @@ jobs:
105106 - php : ' 7.0'
106107 custom_ini : true
107108
108- name : " PHP: ${{ matrix.php }} ${{ matrix.custom_ini && ' with custom ini settings' || '' }}"
109+ name : " PHP: ${{ matrix.php }} ${{ matrix.custom_ini && ' with custom ini settings' || '' }} (${{ matrix.os == 'ubuntu-latest' && 'Linux' || 'Win' }}) "
109110
110111 continue-on-error : ${{ matrix.php == '8.5' }}
111112
@@ -162,7 +163,7 @@ jobs:
162163 - name : ' PHPCS: set the path to PHP'
163164 run : php bin/phpcs --config-set php_path php
164165
165- - name : ' PHPUnit: run the tests without code coverage'
166+ - name : ' PHPUnit: run the full test suite without code coverage'
166167 if : ${{ matrix.skip_tests != true }}
167168 run : vendor/bin/phpunit tests/AllTests.php --no-coverage
168169
@@ -191,19 +192,20 @@ jobs:
191192 run : php phpcs.phar
192193
193194 coverage :
194- runs-on : ubuntu-latest
195+ runs-on : ${{ matrix.os }}
195196
196197 strategy :
197198 matrix :
199+ os : ['ubuntu-latest', 'windows-latest']
200+ php : ['5.4', '8.4']
201+ custom_ini : [false]
202+
198203 include :
199- - php : ' 5.4'
200- custom_ini : false
201204 - php : ' 7.2'
205+ os : ' ubuntu-latest'
202206 custom_ini : true
203- - php : ' 8.4'
204- custom_ini : false
205207
206- name : " Coverage: ${{ matrix.php }} ${{ matrix.custom_ini && ' with custom ini settings' || '' }}"
208+ name : " Coverage: ${{ matrix.php }} ${{ matrix.custom_ini && ' with custom ini settings' || '' }} (${{ matrix.os == 'ubuntu-latest' && 'Linux' || 'Win' }}) "
207209
208210 steps :
209211 - name : Checkout code
@@ -272,20 +274,28 @@ jobs:
272274 run : vendor/bin/phpunit --coverage-cache ./build/phpunit-cache --warm-coverage-cache
273275
274276 - name : " Run the unit tests with code coverage (PHPUnit < 9.3)"
275- if : ${{ steps.phpunit_version.outputs.VERSION < '9.3' }}
277+ if : ${{ matrix.os != 'windows-latest' && steps.phpunit_version.outputs.VERSION < '9.3' }}
276278 run : vendor/bin/phpunit tests/AllTests.php
277279
278280 - name : " Run the unit tests with code coverage (PHPUnit 9.3+)"
279- if : ${{ steps.phpunit_version.outputs.VERSION >= '9.3' }}
281+ if : ${{ matrix.os != 'windows-latest' && steps.phpunit_version.outputs.VERSION >= '9.3' }}
280282 run : vendor/bin/phpunit tests/AllTests.php --coverage-cache ./build/phpunit-cache
281283
284+ - name : " Run the unit tests which may have different outcomes on Windows with code coverage (PHPUnit < 9.3)"
285+ if : ${{ matrix.os == 'windows-latest' && steps.phpunit_version.outputs.VERSION < '9.3' }}
286+ run : vendor/bin/phpunit tests/AllTests.php --group Windows
287+
288+ - name : " Run the unit tests which may have different outcomes on Windows with code coverage (PHPUnit 9.3+)"
289+ if : ${{ matrix.os == 'windows-latest' && steps.phpunit_version.outputs.VERSION >= '9.3' }}
290+ run : vendor/bin/phpunit tests/AllTests.php --group Windows --coverage-cache ./build/phpunit-cache
291+
282292 - name : Upload coverage results to Coveralls
283293 if : ${{ success() }}
284294 uses : coverallsapp/github-action@v2
285295 with :
286296 format : clover
287297 file : build/logs/clover.xml
288- flag-name : php-${{ matrix.php }}-custom-ini-${{ matrix.custom_ini }}
298+ flag-name : os-${{ matrix.os }}- php-${{ matrix.php }}-custom-ini-${{ matrix.custom_ini }}
289299 parallel : true
290300
291301 coveralls-finish :
0 commit comments