Skip to content

Commit aa4bcc9

Browse files
committed
Make PHPStan run on CI
1 parent de31ff9 commit aa4bcc9

File tree

1 file changed

+39
-0
lines changed

1 file changed

+39
-0
lines changed

.github/workflows/phpstan.yml

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
name: PHPStan
2+
3+
on:
4+
push:
5+
branches:
6+
- "*"
7+
pull_request:
8+
branches: [ 'master' ]
9+
10+
jobs:
11+
run:
12+
name: PHPStan
13+
runs-on: 'ubuntu-latest'
14+
strategy:
15+
matrix:
16+
level: [ 0 ]
17+
include:
18+
- current-level: 0
19+
steps:
20+
- uses: actions/checkout@v4
21+
22+
- name: Setup PHP
23+
uses: shivammathur/setup-php@v2
24+
with:
25+
php-version: '8.3'
26+
27+
- name: Install PHPStan
28+
run: composer require --dev phpstan/phpstan
29+
30+
- name: Run PHPStan
31+
if: matrix.level == matrix.current-level
32+
run: ./vendor/bin/phpstan analyse --memory-limit 1G File tests --level "${{ matrix.level }}"
33+
34+
- name: Run PHPStan
35+
if: matrix.level > matrix.current-level
36+
continue-on-error: true
37+
run: |
38+
./vendor/bin/phpstan analyse --memory-limit 1G File tests --level "${{ matrix.level }}"
39+
exit 0

0 commit comments

Comments
 (0)