Skip to content

Run tests on PHP 8.4 and update test environment + PCOV to avoid segfault with Xdebug 3.4.2 #279

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: 3.x
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
45 changes: 37 additions & 8 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,11 @@ on:
jobs:
PHPUnit:
name: PHPUnit (PHP ${{ matrix.php }})
runs-on: ubuntu-22.04
runs-on: ubuntu-24.04
strategy:
matrix:
php:
- 8.4
- 8.3
- 8.2
- 8.1
Expand All @@ -24,12 +25,24 @@ jobs:
- uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php }}
coverage: xdebug
coverage: ${{ matrix.php < 8.0 && 'xdebug' || 'pcov' }}
ini-file: development
ini-values: disable_functions='' # do not disable PCNTL functions on PHP < 8.1
extensions: sockets, pcntl, event, ev
env:
fail-fast: true # fail step if any extension can not be installed
extensions: sockets, pcntl, event
- name: Install ev extension (PHP < 8.0)
if: ${{ matrix.php < '8.0' }}
run: |
sudo apt-get update
sudo apt-get install -y libev-dev
sudo pecl install ev-1.1.5
echo "extension=ev.so" | sudo tee -a "$(php -r 'echo php_ini_loaded_file();')"
- name: Install ev extension (PHP >= 8.0)
if: ${{ matrix.php >= '8.0' }}
run: |
sudo apt-get update
sudo apt-get install -y libev-dev
sudo pecl install ev
echo "extension=ev.so" | sudo tee -a "$(php -r 'echo php_ini_loaded_file();')"
- run: composer install
- run: vendor/bin/phpunit --coverage-text
if: ${{ matrix.php >= 7.3 }}
Expand All @@ -38,11 +51,12 @@ jobs:

PHPUnit-Unstable:
name: PHPUnit (Unstable PHP ${{ matrix.php }})
runs-on: ubuntu-22.04
runs-on: ubuntu-24.04
continue-on-error: true
strategy:
matrix:
php:
- 8.4
- 8.3
- 8.2
- 8.1
Expand All @@ -56,14 +70,28 @@ jobs:
- uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php }}
coverage: xdebug
coverage: ${{ matrix.php < 8.0 && 'xdebug' || 'pcov' }}
ini-file: development
extensions: sockets, pcntl
- name: Install ext-uv
run: |
sudo apt-get update -q && sudo apt-get install libuv1-dev
echo "yes" | sudo pecl install ${{ matrix.php >= 8.0 && 'uv-0.3.0' || 'uv-0.2.4' }}
php -m | grep -q uv || echo "extension=uv.so" >> "$(php -r 'echo php_ini_loaded_file();')"
- name: Install ev extension (PHP < 8.0)
if: ${{ matrix.php < '8.0' }}
run: |
sudo apt-get update
sudo apt-get install -y libev-dev
sudo pecl install ev-1.1.5
echo "extension=ev.so" | sudo tee -a "$(php -r 'echo php_ini_loaded_file();')"
- name: Install ev extension (PHP >= 8.0)
if: ${{ matrix.php >= '8.0' }}
run: |
sudo apt-get update
sudo apt-get install -y libev-dev
sudo pecl install ev
echo "extension=ev.so" | sudo tee -a "$(php -r 'echo php_ini_loaded_file();')"
- run: composer install
- run: vendor/bin/phpunit --coverage-text
if: ${{ matrix.php >= 7.3 }}
Expand All @@ -77,6 +105,7 @@ jobs:
strategy:
matrix:
php:
- 8.4
- 8.3
- 8.2
- 8.1
Expand All @@ -90,7 +119,7 @@ jobs:
- uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php }}
coverage: xdebug
coverage: ${{ matrix.php < 8.0 && 'xdebug' || 'pcov' }}
ini-file: development
extensions: sockets,event # future: add uv-beta (installs, but can not load)
- run: composer install
Expand Down