-
Notifications
You must be signed in to change notification settings - Fork 1
55 lines (43 loc) · 1.61 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
46
47
48
49
50
51
52
53
54
55
name: PHPStan
on:
pull_request:
workflow_dispatch:
permissions:
contents: read
jobs:
phpstan:
runs-on: ${{ matrix.operating-system }}
strategy:
matrix:
operating-system: [ubuntu-latest]
php-versions: ["8.2", "8.3"]
name: PHP ${{ matrix.php-versions }} Static Analysis on ${{ matrix.operating-system }}
env:
PHP_EXTENSIONS: mbstring
key: cache-v1
steps:
- uses: actions/checkout@v3
- name: Setup Cache environment
id: extcache
uses: shivammathur/cache-extensions@v1
with:
php-version: ${{ matrix.php-versions }}
extensions: ${{ env.PHP_EXTENSIONS }}
key: ${{ env.key }}
- name: Cache PHP extensions
uses: actions/cache@v3
with:
path: ${{ steps.extcache.outputs.dir }}
key: ${{ steps.extcache.outputs.key }}
restore-keys: ${{ steps.extcache.outputs.key }}
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php-versions }}
extensions: ${{ env.PHP_EXTENSIONS }}
###> Composer ###
- name: Install Composer packages
run: composer install -q --no-ansi --no-interaction --no-scripts --no-progress --prefer-dist
###< Composer ###
- name: Run PHPSTAN
run: $GITHUB_WORKSPACE/vendor/bin/phpstan --level=9 --error-format=github