-
Notifications
You must be signed in to change notification settings - Fork 9
45 lines (43 loc) · 1.4 KB
/
test.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
name: PHPUnit
on: [ push, pull_request ]
jobs:
ci:
name: Test PHP ${{ matrix.php-version }} on Swoole ${{ matrix.swoole-version }}
runs-on: "${{ matrix.os }}"
env:
SWOOLE_VERSION: ${{ matrix.swoole-version }}
strategy:
matrix:
os: [ ubuntu-latest ]
php-version: [ '7.3', '7.4' ]
swoole-version: [ '4.6.2', '4.5.11' ]
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, swoole.use_shortname='Off'
coverage: none
- name: Setup Swoole
run: |
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-mysqlnd --enable-http2
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 Packages
run: composer update -o --no-scripts
- name: Run Test Cases
run: |
composer analyse
composer test