17
17
fail-fast : true
18
18
matrix :
19
19
php : [7.3, 7.4, 8.0] # 7.2,
20
- os : [ubuntu-latest, macOS-latest] # windows-latest,
20
+ os : [ubuntu-latest] # , macOS-latest, windows-latest,
21
+ coverage : ['none']
22
+ include :
23
+ - description : ' Log Code Coverage'
24
+ php : ' 8.0'
25
+ coverage : ' xdebug'
21
26
# include: # will not testing on php 7.2
22
27
# - os: 'ubuntu-latest'
23
28
# php: '7.2'
@@ -36,38 +41,43 @@ jobs:
36
41
- name : Display Env
37
42
run : env
38
43
44
+ - uses : actions/cache@v2
45
+ with :
46
+ path : ~/.composer/cache/files
47
+ key : ${{ matrix.php }}
48
+
39
49
# usage refer https://github.com/shivammathur/setup-php
40
50
- name : Setup PHP
41
51
timeout-minutes : 5
42
52
uses : shivammathur/setup-php@v2
43
53
with :
44
54
php-version : ${{ matrix.php}}
45
- tools : pecl, php-cs-fixer, phpunit:${{ matrix.phpunit }}
46
- extensions : mbstring, dom, fileinfo, mysql, openssl, igbinary, redis # , swoole-4.4.19 #optional, setup extensions
47
- ini-values : post_max_size=56M, short_open_tag=On # optional, setup php.ini configuration
48
- coverage : none # optional, setup coverage driver: xdebug, none
55
+ tools : php-cs-fixer, phpunit:${{ matrix.phpunit }} # pecl,
56
+ extensions : mbstring # , swoole-4.4.19 #optional, setup extensions
57
+ coverage : ${{ matrix.coverage }} # optional, setup coverage driver: xdebug, none
49
58
50
59
- name : Install dependencies
51
60
run : composer update --no-progress
52
61
53
62
- name : Generate changelog file
54
63
id : changelog
55
- if : ${{ matrix.os == 'ubuntu-latest' && matrix. php == '7.4' }}
64
+ if : ${{ matrix.php == '7.4' }}
56
65
run : |
57
66
wget -c -q https://github.com/inhere/kite/releases/latest/download/kite.phar
58
67
php kite.phar git cl last head --style gh-release --no-merges --fetch-tags --unshallow --file changelog.md
59
68
cat changelog.md
60
69
61
70
# phpunit -v --debug
71
+ # phpdbg -dauto_globals_jit=Off -qrr $(which phpunit) --coverage-clover ./test/clover.info
62
72
- name : Run test suite
63
73
run : |
64
74
php example/flags-demo.php -h
65
75
php example/sflags-demo.php --help
66
- phpdbg -qrr $(which phpunit) --coverage-clover ./test/clover.info
76
+ phpunit --coverage-clover ./test/clover.info
67
77
68
78
- name : Coveralls parallel
69
79
uses : coverallsapp/github-action@master
70
- if : ${{ matrix.os == 'ubuntu-latest' }}
80
+ if : matrix.coverage == 'xdebug'
71
81
with :
72
82
github-token : ${{ secrets.github_token }}
73
83
path-to-lcov : ./test/clover.info
0 commit comments