Support rule required_if
#27
This file contains 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: PHPUnit | |
on: [ push, pull_request ] | |
env: | |
SWOOLE_VERSION: '4.8.0' | |
SWOW_VERSION: 'develop' | |
jobs: | |
swow-ci: | |
name: Test PHP ${{ matrix.php-version }} on Swow | |
runs-on: "${{ matrix.os }}" | |
strategy: | |
matrix: | |
os: [ ubuntu-latest ] | |
php-version: [ '8.0', '8.1', '8.2', '8.3' ] | |
max-parallel: 4 | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v2 | |
- name: Setup PHP | |
uses: shivammathur/setup-php@v2 | |
with: | |
php-version: ${{ matrix.php-version }} | |
tools: phpize | |
ini-values: opcache.enable_cli=1 | |
coverage: none | |
- name: Setup Swow | |
if: ${{ matrix.engine == 'swow' }} | |
run: | | |
wget https://github.com/swow/swow/archive/"${SWOW_VERSION}".tar.gz -O swow.tar.gz | |
mkdir -p swow | |
tar -xf swow.tar.gz -C swow --strip-components=1 | |
rm swow.tar.gz | |
cd swow/ext || exit | |
phpize | |
./configure --enable-debug | |
make -j "$(nproc)" | |
sudo make install | |
sudo sh -c "echo extension=swow > /etc/php/${{ matrix.php-version }}/cli/conf.d/swow.ini" | |
php --ri swow | |
- name: Setup Redis Server | |
run: docker run --name redis --restart always -p 6379:6379 -d redis | |
- name: Setup Swow | |
run: composer require hyperf/engine-swow | |
- name: Setup Packages | |
run: composer update -o | |
- name: Run Test Cases | |
run: | | |
composer test | |
swoole-ci: | |
name: Test PHP ${{ matrix.php-version }} on Swoole | |
runs-on: "${{ matrix.os }}" | |
strategy: | |
matrix: | |
os: [ ubuntu-latest ] | |
php-version: [ '8.0', '8.1', '8.2', '8.3' ] | |
max-parallel: 4 | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v2 | |
- name: Setup PHP | |
uses: shivammathur/setup-php@v2 | |
with: | |
php-version: ${{ matrix.php-version }} | |
tools: phpize | |
ini-values: opcache.enable_cli=1 | |
extensions: redis, pdo, pdo_mysql, bcmath, swoole | |
coverage: none | |
- name: Setup Redis Server | |
run: docker run --name redis --restart always -p 6379:6379 -d redis | |
- name: Setup Packages | |
run: composer update -o | |
- name: Run Test Cases | |
run: | | |
composer test |