@@ -3,61 +3,52 @@ name: Lint and analyse php files
3
3
on :
4
4
push :
5
5
pull_request :
6
- types : [opened, synchronize, reopened]
6
+ types : [ opened, synchronize, reopened ]
7
7
8
8
jobs :
9
- lint-php :
10
- runs-on : ubuntu-latest
11
- steps :
12
- - uses : actions/checkout@v3
13
- - name : Use php 7.2
14
- uses : shivammathur/setup-php@v2
15
- with :
16
- php-version : 7.2
17
- tools : composer:v2
18
- - name : Validate composer.json and composer.lock
19
- run : composer validate
20
- - name : Cache module
21
- uses : actions/cache@v3
22
- with :
23
- path : ~/.composer/cache/
24
- key : composer-cache
25
- - name : Install dependencies
26
- run : composer install
27
- - name : Lint files
28
- run : composer run phpcs
29
-
30
- analyse-php :
31
- runs-on : ubuntu-latest
32
- strategy :
33
- matrix :
34
- php-version : ["7.4"]
35
- steps :
36
- - uses : actions/checkout@v3
37
- - name : Use PHP ${{ matrix.php-version }}
38
- uses : shivammathur/setup-php@v2
39
- with :
40
- php-version : ${{ matrix.php-version }}
41
- tools : composer:v2
42
-
43
- - name : Get Composer cache directory
44
- id : composer-cache
45
- run : |
46
- echo "::set-output name=dir::$(composer config cache-files-dir)"
47
-
48
- - name : Cache dependencies
49
- uses : actions/cache@v3
50
- with :
51
- path : ${{ steps.composer-cache.outputs.dir }}
52
- key : composer-${{ runner.os }}-${{ matrix.php-version }}-${{ hashFiles('**/composer.*') }}
53
- restore-keys : |
54
- composer-${{ runner.os }}-${{ matrix.php-version }}-
55
-
56
- - name : Install dependencies
57
- run : composer install
58
- - name : Analyse files with PHPStan
59
- run : composer run phpstan
60
- - name : Analyse files with Psalm
61
- # Allow the previous check to fail but not abort
62
- if : always()
63
- run : composer run psalm -- --shepherd
9
+ lint-php :
10
+ runs-on : ubuntu-latest
11
+ strategy :
12
+ matrix :
13
+ php-version : [ '7.2' ]
14
+ steps :
15
+ - name : Checkout code
16
+ uses : actions/checkout@v4
17
+
18
+ - name : Set up PHP ${{ matrix.php-version }}
19
+ uses : shivammathur/setup-php@v2
20
+ with :
21
+ php-version : ${{ matrix.php-version }}
22
+
23
+ - name : Install Composer dependencies
24
+ uses : ramsey/composer-install@v3
25
+
26
+ - name : Check coding-standard
27
+ run : composer run phpcs
28
+
29
+ - name : Validate composer.json and composer.lock
30
+ run : composer validate --strict
31
+
32
+ analyse-php :
33
+ runs-on : ubuntu-latest
34
+ strategy :
35
+ matrix :
36
+ php-version : [ '7.4' ]
37
+ steps :
38
+ - name : Checkout code
39
+ uses : actions/checkout@v4
40
+
41
+ - name : Set up PHP ${{ matrix.php-version }}
42
+ uses : shivammathur/setup-php@v2
43
+ with :
44
+ php-version : ${{ matrix.php-version }}
45
+
46
+ - name : Install Composer dependencies
47
+ uses : ramsey/composer-install@v3
48
+
49
+ - name : Analyse files with PHPStan
50
+ run : composer run phpstan
51
+
52
+ - name : Analyse files with Psalm
53
+ if : always()
54
+ run : composer run psalm -- --shepherd
0 commit comments