Skip to content

Commit 4b39d91

Browse files
committed
GH Actions: fail the build if a test run fails
The way things were set up now in the `phpunit` job, no matter whether tests passed or failed, the workflow would always continue. I suspect this may have been set-up this way to make sure that all variations of test runs will actually be run ? The downside is that, while you will see a ❌ for the individual build, the workflow will not be marked as failed if a test runs fails. I'm proposing to change this now by: * Removing the `continue-on-error` for the test run. * Adding the `fail-fast` key and setting it to `false`. By default this key is set to `true`, which means that if any individual build within the job fails, all other builds within the job will be cancelled. By setting it to `false`, all builds in the matrix will still be run, but if any of them fail, the workflow will be marked as "failed".
1 parent 550e0fb commit 4b39d91

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

.github/workflows/push.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,7 @@ jobs:
6161
runs-on: ${{ matrix.operating-system }}
6262
continue-on-error: ${{ matrix.php-versions == '8.1' }}
6363
strategy:
64+
fail-fast: false
6465
matrix:
6566
operating-system:
6667
- ubuntu-latest
@@ -125,7 +126,6 @@ jobs:
125126
run: composer install --no-interaction --prefer-dist --optimize-autoloader
126127

127128
- name: Run PHPUnit
128-
continue-on-error: true
129129
run: php tools/phpunit
130130

131131
codestyle:

0 commit comments

Comments
 (0)