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,8 @@ 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
+ # yamllint disable-line rule:line-length
110
+ name : " PHP: ${{ matrix.php }} ${{ matrix.custom_ini && ' with custom ini settings' || '' }} (${{ matrix.os == 'ubuntu-latest' && 'Linux' || 'Win' }})"
109
111
110
112
continue-on-error : ${{ matrix.php == '8.5' }}
111
113
@@ -162,7 +164,7 @@ jobs:
162
164
- name : ' PHPCS: set the path to PHP'
163
165
run : php bin/phpcs --config-set php_path php
164
166
165
- - name : ' PHPUnit: run the tests without code coverage'
167
+ - name : ' PHPUnit: run the full test suite without code coverage'
166
168
if : ${{ matrix.skip_tests != true }}
167
169
run : vendor/bin/phpunit tests/AllTests.php --no-coverage
168
170
@@ -191,19 +193,21 @@ jobs:
191
193
run : php phpcs.phar
192
194
193
195
coverage :
194
- runs-on : ubuntu-latest
196
+ runs-on : ${{ matrix.os }}
195
197
196
198
strategy :
197
199
matrix :
200
+ os : ['ubuntu-latest', 'windows-latest']
201
+ php : ['5.4', '8.4']
202
+ custom_ini : [false]
203
+
198
204
include :
199
- - php : ' 5.4'
200
- custom_ini : false
201
205
- php : ' 7.2'
206
+ os : ' ubuntu-latest'
202
207
custom_ini : true
203
- - php : ' 8.4'
204
- custom_ini : false
205
208
206
- name : " Coverage: ${{ matrix.php }} ${{ matrix.custom_ini && ' with custom ini settings' || '' }}"
209
+ # yamllint disable-line rule:line-length
210
+ name : " Coverage: ${{ matrix.php }} ${{ matrix.custom_ini && ' with custom ini settings' || '' }} (${{ matrix.os == 'ubuntu-latest' && 'Linux' || 'Win' }})"
207
211
208
212
steps :
209
213
- name : Checkout code
@@ -272,20 +276,28 @@ jobs:
272
276
run : vendor/bin/phpunit --coverage-cache ./build/phpunit-cache --warm-coverage-cache
273
277
274
278
- name : " Run the unit tests with code coverage (PHPUnit < 9.3)"
275
- if : ${{ steps.phpunit_version.outputs.VERSION < '9.3' }}
279
+ if : ${{ matrix.os != 'windows-latest' && steps.phpunit_version.outputs.VERSION < '9.3' }}
276
280
run : vendor/bin/phpunit tests/AllTests.php
277
281
278
282
- name : " Run the unit tests with code coverage (PHPUnit 9.3+)"
279
- if : ${{ steps.phpunit_version.outputs.VERSION >= '9.3' }}
283
+ if : ${{ matrix.os != 'windows-latest' && steps.phpunit_version.outputs.VERSION >= '9.3' }}
280
284
run : vendor/bin/phpunit tests/AllTests.php --coverage-cache ./build/phpunit-cache
281
285
286
+ - name : " Run the unit tests which may have different outcomes on Windows with code coverage (PHPUnit < 9.3)"
287
+ if : ${{ matrix.os == 'windows-latest' && steps.phpunit_version.outputs.VERSION < '9.3' }}
288
+ run : vendor/bin/phpunit tests/AllTests.php --group Windows
289
+
290
+ - name : " Run the unit tests which may have different outcomes on Windows with code coverage (PHPUnit 9.3+)"
291
+ if : ${{ matrix.os == 'windows-latest' && steps.phpunit_version.outputs.VERSION >= '9.3' }}
292
+ run : vendor/bin/phpunit tests/AllTests.php --group Windows --coverage-cache ./build/phpunit-cache
293
+
282
294
- name : Upload coverage results to Coveralls
283
295
if : ${{ success() }}
284
296
uses : coverallsapp/github-action@v2
285
297
with :
286
298
format : clover
287
299
file : build/logs/clover.xml
288
- flag-name : php-${{ matrix.php }}-custom-ini-${{ matrix.custom_ini }}
300
+ flag-name : os-${{ matrix.os }}- php-${{ matrix.php }}-custom-ini-${{ matrix.custom_ini }}
289
301
parallel : true
290
302
291
303
coveralls-finish :
0 commit comments