From 8ded03fc9a83dc1b3b78a07e49d6aa82004a7cf4 Mon Sep 17 00:00:00 2001 From: Rob Allen Date: Wed, 29 Jul 2026 08:00:25 +0100 Subject: [PATCH] Modermise CI workflow Update the CI workflow to run across all PHP versions. Update actions to latest versions. --- .github/workflows/ci.yml | 26 ++++++++++++++++++++------ 1 file changed, 20 insertions(+), 6 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 96d2c83..fd92308 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -3,20 +3,34 @@ name: "CI checks" on: pull_request: push: + branches: + - main + +permissions: + contents: read + +concurrency: + group: ${{ github.workflow }}-${{ github.ref }} + cancel-in-progress: true jobs: ci: - name: "CI checks" + name: "PHP ${{ matrix.php }}" runs-on: ubuntu-latest + strategy: + fail-fast: false + matrix: + php: ["8.1", "8.2", "8.3", "8.4", "8.5"] + steps: - name: Checkout - uses: actions/checkout@v3 + uses: actions/checkout@v7 - name: "Install PHP" uses: shivammathur/setup-php@v2 with: - php-version: "8.2" + php-version: ${{ matrix.php }} coverage: none tools: composer:v2 @@ -26,12 +40,12 @@ jobs: echo "dir=$(composer config cache-files-dir)" >> $GITHUB_OUTPUT - name: "Cache Composer" - uses: actions/cache@v3 + uses: actions/cache@v6 with: path: ${{ steps.composer-cache.outputs.dir }} - key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }} + key: ${{ runner.os }}-php${{ matrix.php }}-composer-${{ hashFiles('**/composer.lock') }} restore-keys: | - ${{ runner.os }}-composer- + ${{ runner.os }}-php${{ matrix.php }}-composer- - name: "Install dependencies" run: composer install --no-progress