Skip to content

Commit 95c68c4

Browse files
committed
GH Actions: fix test run against PHPUnit "dev"
The test run against PHPUnit `dev-main` was using the steps intended for PHPUnit < 10 instead of the steps for PHPUnit 10+, which it should be using.
1 parent 28477a4 commit 95c68c4

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

.github/workflows/test.yml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -155,28 +155,28 @@ jobs:
155155
run: echo ${{ steps.phpunit_version.outputs.VERSION }}
156156

157157
- name: "Run the unit tests (PHPUnit < 10)"
158-
if: ${{ matrix.coverage == false && ! startsWith( steps.phpunit_version.outputs.VERSION, '10.' ) }}
158+
if: ${{ matrix.coverage == false && ! startsWith( steps.phpunit_version.outputs.VERSION, '10.' ) && matrix.phpunit != 'dev-main' }}
159159
run: composer test
160160

161161
- name: "Run the unit tests with code coverage (PHPUnit < 10)"
162-
if: ${{ matrix.coverage == true && ! startsWith( steps.phpunit_version.outputs.VERSION, '10.' ) }}
162+
if: ${{ matrix.coverage == true && ! startsWith( steps.phpunit_version.outputs.VERSION, '10.' ) && matrix.phpunit != 'dev-main' }}
163163
run: composer coverage
164164

165165
# Migrate PHPUnit configuration to deal with changes in the coverage/source setting across PHPUnit 10.x
166166
# versions as otherwise the warning about these would fail the build (which to me, feels like a bug).
167167
- name: "Migrate configuration (PHPUnit 10.0+)"
168168
continue-on-error: true
169-
if: ${{ startsWith( steps.phpunit_version.outputs.VERSION, '10.' ) && steps.phpunit_version.outputs.VERSION != '10.0' }}
169+
if: ${{ startsWith( steps.phpunit_version.outputs.VERSION, '1' ) && steps.phpunit_version.outputs.VERSION != '10.0' }}
170170
run: vendor/bin/phpunit -c phpunit10.xml.dist --migrate-configuration
171171

172172
- name: "Run the unit tests (PHPUnit 10.0+)"
173-
if: ${{ matrix.coverage == false && startsWith( steps.phpunit_version.outputs.VERSION, '10.' ) }}
173+
if: ${{ matrix.coverage == false && startsWith( steps.phpunit_version.outputs.VERSION, '1' ) }}
174174
# Don't fail the build on a test run failure against a future PHPUnit version.
175175
continue-on-error: ${{ matrix.phpunit == 'dev-main' }}
176176
run: composer test10 -- ${{ steps.phpunit_version.outputs.VERSION != '10.0' && env.EXTRA_PHPUNIT_CLIARGS || '' }}
177177

178178
- name: "Run the unit tests with code coverage (PHPUnit 10.0+)"
179-
if: ${{ matrix.coverage == true && startsWith( steps.phpunit_version.outputs.VERSION, '10.' ) }}
179+
if: ${{ matrix.coverage == true && startsWith( steps.phpunit_version.outputs.VERSION, '1' ) }}
180180
# Don't fail the build on a test run failure against a future PHPUnit version.
181181
continue-on-error: ${{ matrix.phpunit == 'dev-main' }}
182182
run: composer coverage10 -- ${{ steps.phpunit_version.outputs.VERSION != '10.0' && env.EXTRA_PHPUNIT_CLIARGS || '' }}

0 commit comments

Comments
 (0)