From 7535e5a980bcc82787bd371047ba5dffade728b8 Mon Sep 17 00:00:00 2001 From: jrfnl Date: Wed, 25 Mar 2026 13:44:47 +0100 Subject: [PATCH 1/2] GH Actions: add actionlint job While GH Actions will fail runs of scripts which contain syntax errors, it isn't always that straight forward to see what's wrong. The `actionlint` package helps with that by providing more informative error messages. Actionlint also checks for a number of best practice to help keep the GH Actions scripts secure and working. Ref: https://github.com/rhysd/actionlint --- .github/workflows/qa.yml | 37 +++++++++++++++++++++++++++++++++++++ 1 file changed, 37 insertions(+) create mode 100644 .github/workflows/qa.yml diff --git a/.github/workflows/qa.yml b/.github/workflows/qa.yml new file mode 100644 index 0000000..3c26aa8 --- /dev/null +++ b/.github/workflows/qa.yml @@ -0,0 +1,37 @@ +name: QA + +on: + # Run on all pushes and on all pull requests. + push: + pull_request: + # Allow manually triggering the workflow. + workflow_dispatch: + +# Cancels all previous workflow runs for the same branch that have not yet completed. +concurrency: + # The concurrency group contains the workflow name and the branch name. + group: ${{ github.workflow }}-${{ github.ref }} + cancel-in-progress: true + +jobs: + actionlint: + name: 'Check GHA workflows' + runs-on: ubuntu-latest + + steps: + - name: Checkout code + uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 + with: + persist-credentials: false + + - name: Add problem matcher + if: ${{ github.event_name == 'pull_request' }} + shell: bash + run: | + curl -o actionlint-matcher.json https://raw.githubusercontent.com/rhysd/actionlint/main/.github/actionlint-matcher.json + echo "::add-matcher::actionlint-matcher.json" + + - name: Check workflow files + uses: docker://rhysd/actionlint:latest + with: + args: -color From e06dfdbf5fa4dde880f1415d74dfd49618f58db4 Mon Sep 17 00:00:00 2001 From: jrfnl Date: Wed, 25 Mar 2026 13:47:04 +0100 Subject: [PATCH 2/2] GH Actions/test: fix condition ... and the Actionlint job yields a result straight away by finding a copy/paste error ;-) --- .github/workflows/tests.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 0f225a0..2fcaa38 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -40,7 +40,7 @@ jobs: uses: "ramsey/composer-install@v3" with: # For PHP "nightly", we need to install with ignore platform reqs as not all dependencies may allow it yet. - composer-options: ${{ matrix.php == '8.6' && '--ignore-platform-req=php+' || '' }} + composer-options: ${{ matrix.php-versions == '8.6' && '--ignore-platform-req=php+' || '' }} # Bust the cache at least once a month - output format: YYYY-MM. custom-cache-suffix: $(date -u "+%Y-%m")