-
Notifications
You must be signed in to change notification settings - Fork 9
41 lines (33 loc) Β· 1.04 KB
/
static-analysis.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
name: Static analysis
on: [push, pull_request]
jobs:
phpstan:
name: PHPStan
runs-on: ubuntu-latest
strategy:
matrix:
php: [8.0]
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Setup PHP
uses: shivammathur/setup-php@master
with:
php-version: ${{ matrix.php }}
coverage: none
- name: Determine composer cache directory
id: composer-cache
run: echo "::set-output name=directory::$(composer config cache-dir)"
- name: Cache dependencies
uses: actions/cache@v1
with:
path: ${{ steps.composer-cache.outputs.directory }}
key: composer-${{ matrix.php }}-${{ hashFiles('composer.*') }}
restore-keys: |
composer-${{ matrix.php }}-
composer-
- name: Install dependencies
run: composer update --no-interaction --no-progress --optimize-autoloader
- name: Run static analysis
if: ${{ matrix.analyse }}
run: vendor/bin/phpstan analyse