Skip to content

Commit 7387e0d

Browse files
committed
GH Actions: fail "setup-php" if requested tooling could not be installed
Setup-PHP will normally "gracefully" show a warning and not fail the build when an extension or tool failed to install. In most cases, this is not particularly useful as that means that either there will be a failure later on in the build due to the extension or tool missing, or the build will not be representative of what is supposed to be tested. This commit changes this behaviour to fail select builds at the `setup-php` step, which also makes debugging these type of build failures much more straight-forward. Ref: https://github.com/shivammathur/setup-php?tab=readme-ov-file#fail-fast-optional
1 parent 783b1e9 commit 7387e0d

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

.github/workflows/test.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,8 @@ jobs:
5656
ini-values: zend.assertions=1, error_reporting=-1, display_errors=On, display_startup_errors=On
5757
coverage: none
5858
tools: cs2pr
59+
env:
60+
fail-fast: true
5961

6062
# Remove the PHPCS standard as it has a minimum PHP requirements of PHP 5.4 and would block install on PHP 5.3.
6163
- name: 'Composer: remove PHPCS'
@@ -117,6 +119,8 @@ jobs:
117119
php-version: ${{ matrix.php }}
118120
ini-values: zend.assertions=1, error_reporting=-1, display_errors=On, display_startup_errors=On
119121
coverage: xdebug
122+
env:
123+
fail-fast: true
120124

121125
- name: Install Composer dependencies - normal
122126
uses: "ramsey/composer-install@65e4f84970763564f46a70b8a54b90d033b3bdda" # 4.0.0

0 commit comments

Comments
 (0)