File tree Expand file tree Collapse file tree 2 files changed +46
-5
lines changed Expand file tree Collapse file tree 2 files changed +46
-5
lines changed Original file line number Diff line number Diff line change
1
+
2
+ name : " Static Analysis"
3
+
4
+ on :
5
+ pull_request :
6
+ branches :
7
+ - " *.x"
8
+ - " master"
9
+ push :
10
+ branches :
11
+ - " *.x"
12
+ - " master"
13
+
14
+ jobs :
15
+ static-analysis-phpstan :
16
+ name : " Static Analysis with PHPStan"
17
+ runs-on : " ubuntu-20.04"
18
+
19
+ strategy :
20
+ matrix :
21
+ php-version :
22
+ - " 7.4"
23
+
24
+ steps :
25
+ - name : " Checkout code"
26
+ uses : " actions/checkout@v2"
27
+
28
+ - name : " Install PHP"
29
+ uses : " shivammathur/setup-php@v2"
30
+ with :
31
+ coverage : " none"
32
+ php-version : " ${{ matrix.php-version }}"
33
+ tools : " cs2pr"
34
+
35
+ - name : " Cache dependencies installed with composer"
36
+ uses : " actions/cache@v2"
37
+ with :
38
+ path : " ~/.composer/cache"
39
+ key : " php-${{ matrix.php-version }}-composer-locked-${{ hashFiles('composer.lock') }}"
40
+ restore-keys : " php-${{ matrix.php-version }}-composer-locked-"
41
+
42
+ - name : " Install dependencies with composer"
43
+ run : " composer install --no-interaction --no-progress --no-suggest"
44
+
45
+ - name : " Run a static analysis with phpstan/phpstan"
46
+ run : " vendor/bin/phpstan analyse --error-format=checkstyle | cs2pr"
Original file line number Diff line number Diff line change 39
39
after_script :
40
40
- wget https://scrutinizer-ci.com/ocular.phar
41
41
- php ocular.phar code-coverage:upload --format=php-clover clover.xml
42
-
43
- - stage : Code Quality
44
- env : STATIC_ANALYSIS
45
- install : travis_retry composer update --prefer-dist
46
- script : vendor/bin/phpstan analyse
You can’t perform that action at this time.
0 commit comments