1
1
---
2
2
name : build
3
3
on :
4
- push : ~
5
- pull_request : ~
4
+ push : ~
5
+ pull_request : ~
6
6
7
7
jobs :
8
- linux_tests :
9
- name : PHP on ${{ matrix.php }} - ${{ matrix.stability }} - ${{ matrix.composer-flags }}
10
- runs-on : ubuntu-20.04
11
- strategy :
12
- matrix :
13
- php : ['8.0', '8.1', '8.2']
14
- stability : [prefer-lowest, prefer-stable]
15
- steps :
16
- - name : Checkout code
17
- uses : actions/checkout@v3
18
-
19
- - name : Setup PHP
20
- uses : shivammathur/setup-php@v2
21
- with :
22
- php-version : ${{ matrix.php }}
23
- coverage : xdebug
24
- tools : composer:v2
25
- - name : Check PHP Version
26
- run : php -v
27
-
28
- - name : Validate composer files
29
- run : composer validate --strict
30
-
31
- - name : Get Composer Cache Directory
32
- id : composer-cache
33
- run : |
34
- echo "dir=$(composer config cache-files-dir)" >> $GITHUB_OUTPUT
35
- - uses : actions/cache@v3
36
- with :
37
- path : ${{ steps.composer-cache.outputs.dir }}
38
- key : ${{ runner.os }}-composer-${{ matrix.stability }}-${{ matrix.flags }}-${{ hashFiles('**/composer.lock') }}
39
- restore-keys : |
40
- ${{ runner.os }}-composer-${{ matrix.stability }}-${{ matrix.flags }}-
41
- ${{ runner.os }}-composer-
42
-
43
- - name : Install dependencies
44
- run : composer update --${{ matrix.stability }} --prefer-dist --no-interaction --no-progress ${{ matrix.flags }}
45
-
46
- - name : Run Unit tests with coverage
47
- run : composer phpunit -- ${{ matrix.phpunit-flags }}
48
-
49
- - name : Run static analysis
50
- run : composer phpstan
51
- if : ${{ matrix.php == '8.2' && matrix.stability == 'prefer-stable'}}
52
-
53
- - name : Run Coding style rules
54
- run : composer phpcs:fix
55
- if : ${{ matrix.php == '8.1' && matrix.stability == 'prefer-stable'}}
8
+ linux_tests :
9
+ name : PHP ${{ matrix.php }} - ${{ matrix.stability }}
10
+ runs-on : ubuntu-latest
11
+ continue-on-error : true
12
+ strategy :
13
+ matrix :
14
+ php : ['8.0', '8.1', '8.2']
15
+ stability : [prefer-stable]
16
+ steps :
17
+ - name : Checkout code
18
+ uses : actions/checkout@v2
19
+
20
+ - name : Setup PHP
21
+ uses : shivammathur/setup-php@v2
22
+ with :
23
+ php-version : ${{ matrix.php }}
24
+ coverage : xdebug
25
+ tools : composer:v2
26
+
27
+ - name : Check PHP Version
28
+ run : php -v
29
+
30
+ - name : Validate composer files
31
+ run : composer validate --strict
32
+
33
+ - name : Cache Composer packages
34
+ id : composer-cache
35
+ uses : actions/cache@v2
36
+ with :
37
+ path : vendor
38
+ key : ${{ runner.os }}-php-${{ hashFiles('**/composer.lock') }}
39
+ restore-keys : |
40
+ ${{ runner.os }}-php-
41
+
42
+ - name : Install dependencies
43
+ run : composer update --${{ matrix.stability }} --prefer-dist --no-interaction --no-progress ${{ matrix.flags }}
44
+
45
+ - name : Run PHPSpec
46
+ run : composer phpspec
47
+
48
+ - name : Run PHPStan static analysis
49
+ run : composer phpstan
50
+
51
+ - name : Run Coding style rules
52
+ run : composer phpcs:fix
53
+ if : ${{ matrix.php == '8.1'}}
0 commit comments