88
88
# - custom_ini: Whether to run with specific custom ini settings to hit very specific
89
89
# code conditions.
90
90
matrix :
91
+ os : ['ubuntu-latest', 'windows-latest']
91
92
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']
92
93
custom_ini : [false]
93
94
@@ -105,7 +106,7 @@ jobs:
105
106
- php : ' 7.0'
106
107
custom_ini : true
107
108
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' }}) "
109
110
110
111
continue-on-error : ${{ matrix.php == '8.5' }}
111
112
@@ -162,7 +163,7 @@ jobs:
162
163
- name : ' PHPCS: set the path to PHP'
163
164
run : php bin/phpcs --config-set php_path php
164
165
165
- - name : ' PHPUnit: run the tests without code coverage'
166
+ - name : ' PHPUnit: run the full test suite without code coverage'
166
167
if : ${{ matrix.skip_tests != true }}
167
168
run : vendor/bin/phpunit tests/AllTests.php --no-coverage
168
169
@@ -191,19 +192,20 @@ jobs:
191
192
run : php phpcs.phar
192
193
193
194
coverage :
194
- runs-on : ubuntu-latest
195
+ runs-on : ${{ matrix.os }}
195
196
196
197
strategy :
197
198
matrix :
199
+ os : ['ubuntu-latest', 'windows-latest']
200
+ php : ['5.4', '8.4']
201
+ custom_ini : [false]
202
+
198
203
include :
199
- - php : ' 5.4'
200
- custom_ini : false
201
204
- php : ' 7.2'
205
+ os : ' ubuntu-latest'
202
206
custom_ini : true
203
- - php : ' 8.4'
204
- custom_ini : false
205
207
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' }}) "
207
209
208
210
steps :
209
211
- name : Checkout code
@@ -272,20 +274,28 @@ jobs:
272
274
run : vendor/bin/phpunit --coverage-cache ./build/phpunit-cache --warm-coverage-cache
273
275
274
276
- 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' }}
276
278
run : vendor/bin/phpunit tests/AllTests.php
277
279
278
280
- 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' }}
280
282
run : vendor/bin/phpunit tests/AllTests.php --coverage-cache ./build/phpunit-cache
281
283
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
+
282
292
- name : Upload coverage results to Coveralls
283
293
if : ${{ success() }}
284
294
uses : coverallsapp/github-action@v2
285
295
with :
286
296
format : clover
287
297
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 }}
289
299
parallel : true
290
300
291
301
coveralls-finish :
0 commit comments