@@ -2,23 +2,99 @@ name: Static code analysis
22
33on : [pull_request]
44
5+
56jobs :
67 phpstan :
78 name : PHPStan
8- runs-on : ubuntu-latest
9+ runs-on : Ubuntu-20.04
10+
911 steps :
10- - uses : actions/checkout@master
11- - name : Run PHPStan
12- uses : docker://jakzal/phpqa:php7.3-alpine
12+ - name : Checkout code
13+ uses : actions/checkout@v2
14+
15+ - name : Cache PHPStan
16+ uses : actions/cache@v2
17+ with :
18+ path : .github/.cache/phpstan/
19+ key : phpstan-${{ github.sha }}
20+ restore-keys : phpstan-
21+
22+ - name : Setup PHP
23+ uses : shivammathur/setup-php@v2
24+ with :
25+ php-version : ' 7.4'
26+ coverage : none
27+
28+ - name : Download dependencies
29+ uses : ramsey/composer-install@v1
1330 with :
14- args : phpstan analyze
31+ composer-options : --no-interaction --prefer-dist --optimize-autoloader
32+
33+ - name : Download PHPStan
34+ run : composer bin phpstan update --no-interaction --no-progress
35+
36+ - name : Execute PHPStan
37+ run : vendor/bin/phpstan analyze --no-progress
1538
1639 php-cs-fixer :
1740 name : PHP-CS-Fixer
18- runs-on : ubuntu-latest
41+ runs-on : Ubuntu-20.04
42+
1943 steps :
20- - uses : actions/checkout@master
21- - name : Run PHP-CS-Fixer
22- uses : docker://jakzal/phpqa:php7.3-alpine
44+ - name : Checkout code
45+ uses : actions/checkout@v2
46+
47+ - name : Cache PhpCsFixer
48+ uses : actions/cache@v2
2349 with :
24- args : php-cs-fixer fix --dry-run --diff-format udiff -vvv
50+ path : .github/.cache/php-cs-fixer/
51+ key : php-cs-fixer-${{ github.sha }}
52+ restore-keys : php-cs-fixer-
53+
54+ - name : Setup PHP
55+ uses : shivammathur/setup-php@v2
56+ with :
57+ php-version : ' 7.4'
58+ coverage : none
59+
60+ - name : Download dependencies
61+ uses : ramsey/composer-install@v1
62+ with :
63+ composer-options : --no-interaction --prefer-dist --optimize-autoloader
64+
65+ - name : Download PHP CS Fixer
66+ run : composer bin php-cs-fixer update --no-interaction --no-progress
67+
68+ - name : Execute PHP CS Fixer
69+ run : vendor/bin/php-cs-fixer fix --diff-format udiff --dry-run
70+
71+ psalm :
72+ name : Psalm
73+ runs-on : Ubuntu-20.04
74+ steps :
75+ - name : Checkout code
76+ uses : actions/checkout@v2
77+
78+ - name : Cache Psalm
79+ uses : actions/cache@v2
80+ with :
81+ path : .github/.cache/psalm/
82+ key : psalm-${{ github.sha }}
83+ restore-keys : psalm-
84+
85+ - name : Setup PHP
86+ uses : shivammathur/setup-php@v2
87+ with :
88+ php-version : ' 7.4'
89+ coverage : none
90+
91+ - name : Download dependencies
92+ uses : ramsey/composer-install@v1
93+ with :
94+ composer-options : --no-interaction --prefer-dist --optimize-autoloader
95+
96+ - name : Download Psalm
97+ run : composer bin psalm update --no-interaction --no-progress
98+
99+ - name : Execute Psalm
100+ run : vendor/bin/psalm --no-progress --output-format=github
0 commit comments