Skip to content

Commit eb38562

Browse files
Update workflow to remove deprecated usage of ubuntu-20.04 OS (#745)
* Update action versions * Use setup php * Delete unused code
1 parent af42b47 commit eb38562

File tree

1 file changed

+8
-11
lines changed

1 file changed

+8
-11
lines changed

.github/workflows/ci.yml

Lines changed: 8 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -22,13 +22,13 @@ jobs:
2222
- php: '8.3'
2323
os: 'ubuntu-24.04'
2424
- php: '8.2'
25-
os: 'ubuntu-20.04'
25+
os: 'ubuntu-24.04'
2626
- php: '8.1'
27-
os: 'ubuntu-20.04'
27+
os: 'ubuntu-24.04'
2828
- php: '8.0'
29-
os: 'ubuntu-20.04'
29+
os: 'ubuntu-24.04'
3030
- php: '7.4'
31-
os: 'ubuntu-20.04'
31+
os: 'ubuntu-24.04'
3232
fail-fast: false
3333
env:
3434
COVERAGE_CACHE_PATH: phpunit-coverage-cache
@@ -37,13 +37,10 @@ jobs:
3737
steps:
3838
- uses: actions/checkout@v4
3939

40-
- name: Switch to PHP ${{ env.PHP_VERSION }}
41-
run: |
42-
sudo update-alternatives --set php /usr/bin/php$PHP_VERSION
43-
sudo update-alternatives --set phar /usr/bin/phar$PHP_VERSION
44-
sudo update-alternatives --set phar.phar /usr/bin/phar.phar$PHP_VERSION
45-
sudo update-alternatives --set phpize /usr/bin/phpize$PHP_VERSION
46-
sudo update-alternatives --set php-config /usr/bin/php-config$PHP_VERSION
40+
- name: Setup PHP
41+
uses: shivammathur/setup-php@v2
42+
with:
43+
php-version: ${{ env.PHP_VERSION }}
4744

4845
- name: Setup INI file
4946
run: |

0 commit comments

Comments
 (0)