From 147ffe1943b0fc1c7734551f44c23ff02128073c Mon Sep 17 00:00:00 2001 From: jrfnl Date: Sun, 26 Jul 2026 23:26:34 +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/basic-qa.yml | 4 ++++ .github/workflows/quicktest.yml | 2 ++ .github/workflows/unit-tests.yml | 2 ++ 3 files changed, 8 insertions(+) diff --git a/.github/workflows/basic-qa.yml b/.github/workflows/basic-qa.yml index 9905d051ad..cd09e555a6 100644 --- a/.github/workflows/basic-qa.yml +++ b/.github/workflows/basic-qa.yml @@ -168,6 +168,8 @@ jobs: # Allow for PHP deprecation notices. ini-values: error_reporting = E_ALL & ~E_DEPRECATED coverage: none + env: + fail-fast: true - name: "Composer: set PHPCS dependencies for tests (dev)" if: ${{ matrix.dependencies == 'dev' }} @@ -250,6 +252,8 @@ jobs: php-version: 'latest' coverage: none tools: phpstan:1.x + env: + fail-fast: true # Install dependencies and handle caching in one go. # Dependencies need to be installed to make sure the PHPCS and PHPUnit classes are recognized. diff --git a/.github/workflows/quicktest.yml b/.github/workflows/quicktest.yml index 922b604bb9..d43d33206f 100644 --- a/.github/workflows/quicktest.yml +++ b/.github/workflows/quicktest.yml @@ -42,6 +42,8 @@ jobs: # Unit tests don't need to fail on those for stable releases where those issues won't get fixed anymore. ini-values: error_reporting=-1, display_errors=On, display_startup_errors=On coverage: ${{ github.ref_name == 'develop' && 'xdebug' || 'none' }} + env: + fail-fast: true - name: Enable creation of `composer.lock` file if: ${{ matrix.dependencies == 'lowest' }} diff --git a/.github/workflows/unit-tests.yml b/.github/workflows/unit-tests.yml index b883e601c0..5f3ba45a55 100644 --- a/.github/workflows/unit-tests.yml +++ b/.github/workflows/unit-tests.yml @@ -96,6 +96,8 @@ jobs: ini-values: ${{ steps.set_ini.outputs.PHP_INI }} coverage: ${{ matrix.coverage && 'xdebug' || 'none' }} tools: cs2pr + env: + fail-fast: true - name: "Composer: set PHPCS dependencies for tests (dev)" if: ${{ matrix.dependencies == 'dev' }}