From 150e53251e37c6241dda6902dd2b9afca1e5842f Mon Sep 17 00:00:00 2001 From: Cees-Jan Kiewiet Date: Tue, 25 Jan 2022 10:33:19 +0100 Subject: [PATCH] Test all supported event loops --- .github/workflows/ci.yml | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 465821a..9ef71f0 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -6,10 +6,14 @@ on: jobs: PHPUnit: - name: PHPUnit (PHP ${{ matrix.php }}) + name: PHPUnit (PHP ${{ matrix.php }} ${{ matrix.event-loop }}) runs-on: ubuntu-20.04 strategy: matrix: + event-loop: + - '' + - 'event' + - 'uv' php: - 8.1 - 8.0 @@ -28,6 +32,19 @@ jobs: with: php-version: ${{ matrix.php }} coverage: xdebug + extensions: socket + - run: sudo apt-get update && sudo apt-get install libevent-dev + - name: Install ext-event + run: | + echo "yes" | sudo pecl install event + echo "extension=event.so" | sudo tee -a "$(php -r 'echo php_ini_loaded_file();')" + if: ${{ matrix.event-loop == 'event' }} + - name: Install ext-uv + run: | + sudo add-apt-repository ppa:ondrej/php -y && sudo apt-get update -q && sudo apt-get install libuv1-dev + echo "yes" | sudo pecl install uv-beta + echo "extension=uv.so" >> "$(php -r 'echo php_ini_loaded_file();')" + if: ${{ matrix.event-loop == 'uv' }} - run: composer install - run: vendor/bin/phpunit --coverage-text if: ${{ matrix.php >= 7.3 }}