Skip to content

Commit 63aa020

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 in the workflow summary, the workflow will not be marked as failed, nor will the individual test builds be marked as failed. If we look back at the last time the workflow was run completely, this can be seen in the annotations below the summary, which show that the Windows test runs all failed. https://github.com/phpDocumentor/ReflectionDocBlock/actions/runs/370378454 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 ece0c41 commit 63aa020

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
@@ -54,6 +54,7 @@ jobs:
5454
name: Unit tests for PHP version ${{ matrix.php-versions }} on ${{ matrix.operating-system }}
5555
runs-on: ${{ matrix.operating-system }}
5656
strategy:
57+
fail-fast: false
5758
matrix:
5859
operating-system:
5960
- ubuntu-latest
@@ -110,7 +111,6 @@ jobs:
110111
composer-options: --optimize-autoloader
111112

112113
- name: Run PHPUnit
113-
continue-on-error: true
114114
run: php tools/phpunit
115115

116116
codestyle:

0 commit comments

Comments
 (0)