From bab8b5d9448e8eb47976506f45f7850beeaae695 Mon Sep 17 00:00:00 2001 From: jrfnl Date: Sun, 26 Jul 2026 23:36:55 +0200 Subject: [PATCH] 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 --- .github/workflows/release.yml | 2 ++ .github/workflows/test.yml | 4 ++++ 2 files changed, 6 insertions(+) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 5eafe36..80e958c 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -63,6 +63,8 @@ jobs: php-version: ${{ matrix.php }} ini-values: error_reporting=-1, display_errors=On, display_startup_errors=On, zend.assertions=1 coverage: none + env: + fail-fast: true - name: Run linter against codebase run: php ./parallel-lint.phar src/ diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index d040ff5..d8b4142 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -26,6 +26,8 @@ jobs: php-version: 'latest' coverage: none tools: cs2pr + env: + fail-fast: true - name: Checkout code uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0 @@ -85,6 +87,8 @@ jobs: php-version: ${{ matrix.php }} ini-values: error_reporting=-1, display_errors=On, display_startup_errors=On, zend.assertions=1 coverage: none + env: + fail-fast: true # Remove the PHPCS standard as it has a minimum PHP requirements of PHP 5.4 and would block install on PHP 5.3. - name: 'Composer: remove PHPCS'