Skip to content

Commit d8d60d5

Browse files
Run the static analyzers on actions
1 parent f24e406 commit d8d60d5

File tree

1 file changed

+102
-0
lines changed

1 file changed

+102
-0
lines changed

.github/workflows/static.yml

Lines changed: 102 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,102 @@
1+
name: Static Analysis
2+
3+
on:
4+
push:
5+
pull_request:
6+
7+
jobs:
8+
phpstan_src:
9+
name: PHPStan Source
10+
runs-on: ubuntu-20.04
11+
12+
steps:
13+
- name: Checkout code
14+
uses: actions/checkout@v2
15+
16+
- name: Setup PHP
17+
uses: shivammathur/setup-php@v2
18+
with:
19+
php-version: 7.4
20+
tools: composer:v2
21+
coverage: none
22+
23+
- name: Install Dependencies
24+
uses: nick-invision/retry@v1
25+
with:
26+
timeout_minutes: 5
27+
max_attempts: 5
28+
command: composer update --no-interaction --no-progress
29+
30+
- name: Install PHPStan
31+
uses: nick-invision/retry@v1
32+
with:
33+
timeout_minutes: 5
34+
max_attempts: 5
35+
command: composer bin phpstan update --no-interaction --no-progress
36+
37+
- name: Execute PHPStan
38+
run: vendor/bin/phpstan analyze src -c phpstan.src.neon.dist --no-progress
39+
40+
phpstan_tests:
41+
name: PHPStan Tests
42+
runs-on: ubuntu-20.04
43+
44+
steps:
45+
- name: Checkout code
46+
uses: actions/checkout@v2
47+
48+
- name: Setup PHP
49+
uses: shivammathur/setup-php@v2
50+
with:
51+
php-version: 7.4
52+
tools: composer:v2
53+
coverage: none
54+
55+
- name: Install Dependencies
56+
uses: nick-invision/retry@v1
57+
with:
58+
timeout_minutes: 5
59+
max_attempts: 5
60+
command: composer update --no-interaction --no-progress
61+
62+
- name: Install PHPStan
63+
uses: nick-invision/retry@v1
64+
with:
65+
timeout_minutes: 5
66+
max_attempts: 5
67+
command: composer bin phpstan update --no-interaction --no-progress
68+
69+
- name: Execute PHPStan
70+
run: vendor/bin/phpstan analyze tests -c phpstan.tests.neon.dist --no-progress
71+
72+
psalm:
73+
name: Psalm
74+
runs-on: ubuntu-20.04
75+
76+
steps:
77+
- name: Checkout code
78+
uses: actions/checkout@v2
79+
80+
- name: Setup PHP
81+
uses: shivammathur/setup-php@v2
82+
with:
83+
php-version: 7.4
84+
tools: composer:v2
85+
coverage: none
86+
87+
- name: Install Dependencies
88+
uses: nick-invision/retry@v1
89+
with:
90+
timeout_minutes: 5
91+
max_attempts: 5
92+
command: composer update --no-interaction --no-progress
93+
94+
- name: Install Psalm
95+
uses: nick-invision/retry@v1
96+
with:
97+
timeout_minutes: 5
98+
max_attempts: 5
99+
command: composer bin psalm update --no-interaction --no-progress
100+
101+
- name: Execute Psalm
102+
run: vendor/bin/psalm --no-progress --output-format=github

0 commit comments

Comments
 (0)