Skip to content

Set ClosureProcess default enable start. (#67) #170

Set ClosureProcess default enable start. (#67)

Set ClosureProcess default enable start. (#67) #170

Workflow file for this run

name: PHPUnit
on: [ push, pull_request ]
env:
SWOW_VERSION: 'develop'
DAEMONIZE: '(true)'
jobs:
ci:
name: Test PHP ${{ matrix.php }} on Swoole ${{ matrix.swoole }}
runs-on: "${{ matrix.os }}"
env:
SWOOLE_VERSION: ${{ matrix.swoole }}
strategy:
matrix:
os: [ ubuntu-latest ]
php: [ '8.0', '8.1', '8.2' ]
engine: [ 'swoole' ]
swoole: [ 'v4.6.7', 'v4.7.1', 'v4.8.12', 'v5.0.3', 'master' ]
exclude:
- php: '8.1'
swoole: 'v4.6.7'
- php: '8.1'
swoole: 'v4.7.1'
- php: '8.2'
swoole: 'v4.6.7'
- php: '8.2'
swoole: 'v4.7.1'
- php: '8.2'
swoole: 'v4.8.12'
max-parallel: 16
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php }}
tools: phpize
extensions: redis, pdo, pdo_mysql, bcmath
ini-values: opcache.enable_cli=0, swoole.use_shortname='Off'
coverage: none
- name: Setup Swoole
if: ${{ matrix.engine == 'swoole' }}
run: |
sudo apt-get clean
sudo apt-get update
sudo apt-get upgrade -f
sudo apt-get install libcurl4-openssl-dev libc-ares-dev libpq-dev
wget https://github.com/swoole/swoole-src/archive/${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
if [ _${{ matrix.sw-version }} = '_v5.0.3' ] || [ _${{ matrix.sw-version }} = '_master' ]
then
./configure --enable-openssl --enable-swoole-curl --enable-cares --enable-swoole-pgsql --enable-brotli
else
./configure --enable-openssl --enable-http2 --enable-swoole-curl --enable-swoole-json
fi
make -j$(nproc)
sudo make install
sudo sh -c "echo extension=swoole > /etc/php/${{ matrix.php }}/cli/conf.d/swoole.ini"
sudo sh -c "echo swoole.use_shortname='Off' >> /etc/php/${{ matrix.php }}/cli/conf.d/swoole.ini"
php --ri swoole
- 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 }}/cli/conf.d/swow.ini"
php --ri swow
- name: Setup Services
run: docker run --name mysql -p 3306:3306 -e MYSQL_ALLOW_EMPTY_PASSWORD=true -d mysql:5.7 --bind-address=0.0.0.0 --default-authentication-plugin=mysql_native_password
- name: Setup MySQL
run: export TRAVIS_BUILD_DIR=$(pwd) && bash ./.travis/setup.mysql.sh
- name: Setup Packages
run: composer update -o --no-scripts
- name: Run Server
run: |
php example/index.php start
sleep 5
- name: Run Analyse
run: |
composer analyse src
- name: Run Test Cases
run: |
composer test