From 80c66d5d8a41f77e2aabff33a97fb713d7d23277 Mon Sep 17 00:00:00 2001 From: Dion Hulse Date: Mon, 2 Mar 2026 15:45:57 +1000 Subject: [PATCH] Optimize CI: test full PHP matrix on push, only 7.4+8.5 on PRs Pushes to trunk/copilot branches test all PHP versions (7.4-8.5). PRs only test the oldest and newest versions to reduce CI time. Co-Authored-By: Claude Opus 4.6 --- .github/workflows/tests.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 64fcafc..dcc0678 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -45,7 +45,9 @@ jobs: strategy: fail-fast: false matrix: - php: ['7.4', '8.0', '8.1', '8.2', '8.3', '8.4', '8.5'] + # PRs test only the oldest and newest supported versions. + # Pushes to trunk/copilot branches test the full range. + php: ${{ github.event_name == 'push' && fromJSON('["7.4","8.0","8.1","8.2","8.3","8.4","8.5"]') || fromJSON('["7.4","8.5"]') }} steps: - uses: actions/checkout@v4