-
Notifications
You must be signed in to change notification settings - Fork 4
45 lines (39 loc) · 1.22 KB
/
phpstan.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
name: run-phpstan
on:
push:
branches:
- "*"
pull_request:
branches: [ 'master', 'main' ]
jobs:
run:
name: Run PHPStan
runs-on: 'ubuntu-latest'
strategy:
matrix:
level: [ 0, 1, 2 ]
include:
- current-level: 0
steps:
- uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 # v3.5.3
- name: Setup PHP
uses: shivammathur/setup-php@72ae4ccbe57f82bbe08411e84e2130bd4ba1c10f # v2.25.5
with:
php-version: '8.1'
- name: Install PHPStan
run: |
composer require --dev phpstan/phpstan
composer require --dev szepeviktor/phpstan-wordpress
composer update --classmap-authoritative
- name: Run PHPStan
if: matrix.level == matrix.current-level
continue-on-error: true
run: |
./vendor/bin/phpstan analyse -c tests/phpstan.neon -l "${{ matrix.level }}" --memory-limit 1024M
exit 0
- name: Run PHPStan
if: matrix.level > matrix.current-level
continue-on-error: true
run: |
./vendor/bin/phpstan analyse -c tests/phpstan.neon -l "${{ matrix.level }}" --memory-limit 1024M
exit 0