Skip to content

Commit 3bfe90f

Browse files
Update GitHub Actions CI (#28)
The Ubuntu 20.04 LTS runner was retired on 2025-04-15 [1]; given how rarely we touch this library, I think jumping on the “ubuntu-latest” train has a higher chance of succeeding. More recent Ubuntu images no longer contain several PHP versions [2] [3]; the most common approach seems to be the shivammathur/setup-php action, so let’s use that. [1]: actions/runner-images#11101 [2]: https://github.com/actions/runner-images/blob/releases/ubuntu22/20250601/images/ubuntu/Ubuntu2204-Readme.md#php-tools [3]: https://github.com/actions/runner-images/blob/releases/ubuntu24/20250601/images/ubuntu/Ubuntu2404-Readme.md#php-tools
1 parent e9b56e7 commit 3bfe90f

File tree

1 file changed

+4
-9
lines changed

1 file changed

+4
-9
lines changed

.github/workflows/php.yml

Lines changed: 4 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -13,27 +13,22 @@ jobs:
1313
fail-fast: false
1414
matrix:
1515
include:
16-
# Includes php7.4 - 8.3 and composer 2
17-
# https://github.com/actions/runner-images/blob/releases/ubuntu20/20241023/images/ubuntu/Ubuntu2004-Readme.md#php-tools
1816
- php: '7.4'
19-
os: ubuntu-20.04
2017
- php: '8.0'
21-
os: ubuntu-20.04
2218
- php: '8.1'
23-
os: ubuntu-20.04
2419
- php: '8.2'
25-
os: ubuntu-20.04
2620
- php: '8.3'
27-
os: ubuntu-20.04
2821

29-
runs-on: ${{ matrix.os }}
22+
runs-on: ubuntu-latest
3023

3124
steps:
3225
- name: Checkout
3326
uses: actions/checkout@v2
3427

3528
- name: Use PHP ${{ matrix.php }}
36-
run: sudo update-alternatives --set php /usr/bin/php${{ matrix.php }}
29+
uses: shivammathur/setup-php@v2
30+
with:
31+
php-version: ${{ matrix.php }}
3732

3833
- name: Validate composer.json and composer.lock
3934
run: composer validate

0 commit comments

Comments
 (0)