Skip to content

Commit

Permalink
Update
Browse files Browse the repository at this point in the history
  • Loading branch information
limingxinleo committed Apr 29, 2024
1 parent 33c9882 commit 6acc412
Showing 1 changed file with 29 additions and 20 deletions.
49 changes: 29 additions & 20 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,15 +7,14 @@ env:
SWOW_VERSION: 'develop'

jobs:
ci:
name: Test PHP ${{ matrix.php-version }} on ${{ matrix.engine }}
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' ]
engine: [ 'swoole', 'swow' ]
max-parallel: 8
max-parallel: 4
steps:
- name: Checkout
uses: actions/checkout@v2
Expand All @@ -26,21 +25,6 @@ jobs:
tools: phpize
ini-values: opcache.enable_cli=1
coverage: none
- name: Setup Swoole
if: ${{ matrix.engine == 'swoole' }}
run: |
sudo apt-get install libcurl4-openssl-dev
wget https://github.com/swoole/swoole-src/archive/v${SWOOLE_VERSION}.tar.gz -O swoole.tar.gz
mkdir -p swoole
tar -xf swoole.tar.gz -C swoole --strip-components=1
rm swoole.tar.gz
cd swoole
phpize
./configure --enable-openssl --enable-http2 --enable-swoole-curl --enable-swoole-json
make -j$(nproc)
sudo make install
sudo sh -c "echo extension=swoole > /etc/php/${{ matrix.php-version }}/cli/conf.d/swoole.ini"
php --ri swoole
- name: Setup Swow
if: ${{ matrix.engine == 'swow' }}
run: |
Expand All @@ -59,10 +43,35 @@ jobs:
- name: Setup Redis Server
run: docker run --name redis --restart always -p 6379:6379 -d redis
- name: Setup Swow
if: ${{ matrix.engine == '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 ${{ matrix.engine }}
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

0 comments on commit 6acc412

Please sign in to comment.