Skip to content

Commit d9b78c6

Browse files
committed
Run tests on PHP 8.4 and update test environment
1 parent f2fb5a2 commit d9b78c6

File tree

1 file changed

+37
-8
lines changed

1 file changed

+37
-8
lines changed

.github/workflows/ci.yml

Lines changed: 37 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,11 @@ on:
77
jobs:
88
PHPUnit:
99
name: PHPUnit (PHP ${{ matrix.php }})
10-
runs-on: ubuntu-22.04
10+
runs-on: ubuntu-24.04
1111
strategy:
1212
matrix:
1313
php:
14+
- 8.4
1415
- 8.3
1516
- 8.2
1617
- 8.1
@@ -24,12 +25,24 @@ jobs:
2425
- uses: shivammathur/setup-php@v2
2526
with:
2627
php-version: ${{ matrix.php }}
27-
coverage: xdebug
28+
coverage: ${{ matrix.php < 8.0 && 'xdebug' || 'pcov' }}
2829
ini-file: development
2930
ini-values: disable_functions='' # do not disable PCNTL functions on PHP < 8.1
30-
extensions: sockets, pcntl, event, ev
31-
env:
32-
fail-fast: true # fail step if any extension can not be installed
31+
extensions: sockets, pcntl, event
32+
- name: Install ev extension (PHP < 8.0)
33+
if: ${{ matrix.php < '8.0' }}
34+
run: |
35+
sudo apt-get update
36+
sudo apt-get install -y libev-dev
37+
sudo pecl install ev-1.1.5
38+
echo "extension=ev.so" | sudo tee -a "$(php -r 'echo php_ini_loaded_file();')"
39+
- name: Install ev extension (PHP >= 8.0)
40+
if: ${{ matrix.php >= '8.0' }}
41+
run: |
42+
sudo apt-get update
43+
sudo apt-get install -y libev-dev
44+
sudo pecl install ev
45+
echo "extension=ev.so" | sudo tee -a "$(php -r 'echo php_ini_loaded_file();')"
3346
- run: composer install
3447
- run: vendor/bin/phpunit --coverage-text
3548
if: ${{ matrix.php >= 7.3 }}
@@ -38,11 +51,12 @@ jobs:
3851

3952
PHPUnit-Unstable:
4053
name: PHPUnit (Unstable PHP ${{ matrix.php }})
41-
runs-on: ubuntu-22.04
54+
runs-on: ubuntu-24.04
4255
continue-on-error: true
4356
strategy:
4457
matrix:
4558
php:
59+
- 8.4
4660
- 8.3
4761
- 8.2
4862
- 8.1
@@ -56,14 +70,28 @@ jobs:
5670
- uses: shivammathur/setup-php@v2
5771
with:
5872
php-version: ${{ matrix.php }}
59-
coverage: xdebug
73+
coverage: ${{ matrix.php < 8.0 && 'xdebug' || 'pcov' }}
6074
ini-file: development
6175
extensions: sockets, pcntl
6276
- name: Install ext-uv
6377
run: |
6478
sudo apt-get update -q && sudo apt-get install libuv1-dev
6579
echo "yes" | sudo pecl install ${{ matrix.php >= 8.0 && 'uv-0.3.0' || 'uv-0.2.4' }}
6680
php -m | grep -q uv || echo "extension=uv.so" >> "$(php -r 'echo php_ini_loaded_file();')"
81+
- name: Install ev extension (PHP < 8.0)
82+
if: ${{ matrix.php < '8.0' }}
83+
run: |
84+
sudo apt-get update
85+
sudo apt-get install -y libev-dev
86+
sudo pecl install ev-1.1.5
87+
echo "extension=ev.so" | sudo tee -a "$(php -r 'echo php_ini_loaded_file();')"
88+
- name: Install ev extension (PHP >= 8.0)
89+
if: ${{ matrix.php >= '8.0' }}
90+
run: |
91+
sudo apt-get update
92+
sudo apt-get install -y libev-dev
93+
sudo pecl install ev
94+
echo "extension=ev.so" | sudo tee -a "$(php -r 'echo php_ini_loaded_file();')"
6795
- run: composer install
6896
- run: vendor/bin/phpunit --coverage-text
6997
if: ${{ matrix.php >= 7.3 }}
@@ -77,6 +105,7 @@ jobs:
77105
strategy:
78106
matrix:
79107
php:
108+
- 8.4
80109
- 8.3
81110
- 8.2
82111
- 8.1
@@ -90,7 +119,7 @@ jobs:
90119
- uses: shivammathur/setup-php@v2
91120
with:
92121
php-version: ${{ matrix.php }}
93-
coverage: xdebug
122+
coverage: ${{ matrix.php < 8.0 && 'xdebug' || 'pcov' }}
94123
ini-file: development
95124
extensions: sockets,event # future: add uv-beta (installs, but can not load)
96125
- run: composer install

0 commit comments

Comments
 (0)