6
6
7
7
jobs :
8
8
linux_tests :
9
- name : PHP ${{ matrix.php }} - ${{ matrix.stability }}
10
- runs-on : ubuntu-latest
11
- continue-on-error : true
9
+ name : PHP on ${{ matrix.php }} - ${{ matrix.stability }} - ${{ matrix.composer-flags }}
10
+ runs-on : ubuntu-20.04
12
11
strategy :
13
12
matrix :
14
- php : ['8.1']
13
+ php : ['8.1', '8.2' ]
15
14
stability : [prefer-lowest, prefer-stable]
16
- include :
17
- - php : ' 8.2'
18
- flags : " --ignore-platform-req=php"
19
- phpunit-flags : ' --no-coverage'
20
- stability : prefer-stable
21
15
steps :
22
16
- name : Checkout code
23
- uses : actions/checkout@v2
17
+ uses : actions/checkout@v3
24
18
25
19
- name : Setup PHP
26
20
uses : shivammathur/setup-php@v2
27
21
with :
28
22
php-version : ${{ matrix.php }}
29
23
coverage : xdebug
30
24
tools : composer:v2
31
-
32
25
- name : Check PHP Version
33
26
run : php -v
34
27
38
31
- name : Get Composer Cache Directory
39
32
id : composer-cache
40
33
run : |
41
- echo "::set-output name= dir:: $(composer config cache-files-dir)"
42
- - uses : actions/cache@v2
34
+ echo "dir= $(composer config cache-files-dir)" >> $GITHUB_OUTPUT
35
+ - uses : actions/cache@v3
43
36
with :
44
37
path : ${{ steps.composer-cache.outputs.dir }}
45
38
key : ${{ runner.os }}-composer-${{ matrix.stability }}-${{ matrix.flags }}-${{ hashFiles('**/composer.lock') }}
@@ -53,10 +46,10 @@ jobs:
53
46
- name : Run Unit tests with coverage
54
47
run : composer phpunit -- ${{ matrix.phpunit-flags }}
55
48
56
- - name : Run PHPStan static analysis
49
+ - name : Run static analysis
57
50
run : composer phpstan
58
- if : ${{ matrix.php == '8.1 ' && matrix.stability == 'prefer-stable'}}
51
+ if : ${{ matrix.php == '8.2 ' && matrix.stability == 'prefer-stable'}}
59
52
60
- - name : Run coding style check
61
- run : composer phpcs
53
+ - name : Run Coding style rules
54
+ run : composer phpcs:fix
62
55
if : ${{ matrix.php == '8.1' && matrix.stability == 'prefer-stable'}}
0 commit comments