-
-
Notifications
You must be signed in to change notification settings - Fork 1
46 lines (36 loc) · 1.13 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
42
43
44
45
46
name: "Static Analysis"
on:
push:
paths-ignore:
- 'doc/**'
pull_request:
paths-ignore:
- 'doc/**'
jobs:
phpstan:
name: PHPStan
runs-on: ubuntu-latest
steps:
- uses: actions/[email protected]
- name: Setup PHP with PECL extension
uses: shivammathur/[email protected]
with:
php-version: 8.0
tools: composer:v2
coverage: none
- name: Validate composer.json and composer.lock
run: composer validate
- name: Get composer cache directory
id: composer-cache
run: echo "::set-output name=dir::$(composer config cache-files-dir)"
- name: Cache Composer packages
uses: actions/[email protected]
with:
path: ${{ steps.composer-cache.outputs.dir }}
key: phpstan-linux-php-8.0-${{ hashFiles('**/composer.lock') }}
restore-keys: phpstan-linux-php-8.0-
- name: Install dependencies
if: steps.composer-cache.outputs.cache-hit != 'true'
run: composer update --prefer-stable --ignore-platform-req=php --no-progress --no-interaction
- name: Run PHPStan
run: composer run-script phpstan -- --no-progress