-
Notifications
You must be signed in to change notification settings - Fork 6
54 lines (47 loc) · 1.75 KB
/
php.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
46
47
48
49
50
51
52
53
54
#
# Github actions for swoft component tests
# https://github.com/marketplace?type=actions
#
name: Unit-tests
on: [push, pull_request]
# usage refer https://github.com/shivammathur/setup-php
jobs:
test:
name: Test on php ${{ matrix.php}} and ${{ matrix.os }} OS
runs-on: ${{ matrix.os }}
timeout-minutes: 20
env:
SWOFT_DEBUG: 0
strategy:
fail-fast: true # fast fail
matrix:
php: [7.2, 7.3, 7.4, 8.0]
os: [ubuntu-latest] # , macOS-latest, windows-latest
swoole-versions: [''] # latest
include:
- os: 'ubuntu-latest'
php: '7.1'
swoole-versions: '-4.5.11'
steps:
- uses: actions/checkout@v2
# usage refer https://github.com/shivammathur/setup-php
- name: Setup PHP
timeout-minutes: 5
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php}}
extensions: mbstring, dom, fileinfo, mysql, openssl, redis, swoole${{ matrix.swoole-versions }} #optional, setup extensions
ini-values: post_max_size=56M, short_open_tag=On #optional, setup php.ini configuration
coverage: none #optional, setup coverage driver: xdebug, none
- name: Display swoole extensions
timeout-minutes: 1
run: php --ri swoole
# sudo pecl install -f swoole
# echo 'no' | pecl install -f redis
# sudo pecl update-channels && pecl install -f msgpack && pecl install -f igbinary && php -m
- name: Install dependencies
run: composer install --no-progress --no-suggest
# Add a test script to composer.json, for instance: "test": "vendor/bin/phpunit"
# Docs: https://getcomposer.org/doc/articles/scripts.md
- name: Run test suite
run: composer run test