Run tests on PHP 8.4 and update test environment + PCOV to avoid segfault with Xdebug 3.4.2 #147
Workflow file for this run
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: CI | |
on: | |
push: | |
pull_request: | |
jobs: | |
PHPUnit: | |
name: PHPUnit (PHP ${{ matrix.php }}) | |
runs-on: ubuntu-24.04 | |
strategy: | |
matrix: | |
php: | |
- 8.4 | |
- 8.3 | |
- 8.2 | |
- 8.1 | |
- 8.0 | |
- 7.4 | |
- 7.3 | |
- 7.2 | |
- 7.1 | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: shivammathur/setup-php@v2 | |
with: | |
php-version: ${{ matrix.php }} | |
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 | |
- 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 }} | |
- run: vendor/bin/phpunit --coverage-text -c phpunit.xml.legacy | |
if: ${{ matrix.php < 7.3 }} | |
PHPUnit-Unstable: | |
name: PHPUnit (Unstable PHP ${{ matrix.php }}) | |
runs-on: ubuntu-24.04 | |
continue-on-error: true | |
strategy: | |
matrix: | |
php: | |
- 8.4 | |
- 8.3 | |
- 8.2 | |
- 8.1 | |
- 8.0 | |
- 7.4 | |
- 7.3 | |
- 7.2 | |
- 7.1 | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: shivammathur/setup-php@v2 | |
with: | |
php-version: ${{ matrix.php }} | |
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 }} | |
- run: vendor/bin/phpunit --coverage-text -c phpunit.xml.legacy | |
if: ${{ matrix.php < 7.3 }} | |
PHPUnit-Windows: | |
name: PHPUnit (PHP ${{ matrix.php }} on Windows) | |
runs-on: windows-2022 | |
continue-on-error: true | |
strategy: | |
matrix: | |
php: | |
- 8.4 | |
- 8.3 | |
- 8.2 | |
- 8.1 | |
- 8.0 | |
- 7.4 | |
- 7.3 | |
- 7.2 | |
- 7.1 | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: shivammathur/setup-php@v2 | |
with: | |
php-version: ${{ matrix.php }} | |
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 | |
- run: vendor/bin/phpunit --coverage-text | |
if: ${{ matrix.php >= 7.3 }} | |
- run: vendor/bin/phpunit --coverage-text -c phpunit.xml.legacy | |
if: ${{ matrix.php < 7.3 }} |