forked from OpenMage/magento-lts
-
Notifications
You must be signed in to change notification settings - Fork 1
51 lines (41 loc) · 1.45 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
name: "PHPStan Static Code Analyses"
on:
# Run on all pushes and on all pull requests.
# Prevent the build from running when there are only irrelevant changes.
push:
paths-ignore:
- '**.md'
pull_request:
paths-ignore:
- '**.md'
# Allow manually triggering the workflow.
workflow_dispatch:
jobs:
php_stan:
runs-on: [ubuntu-latest]
strategy:
matrix:
config_files: [
'.github/phpstan.neon',
'.github/phpstan_experimental_level.neon'
]
name: PHP Stan ${{ matrix.config_files }}
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: Get composer cache directory
id: composer-cache
run: echo "::set-output name=dir::$(composer config cache-files-dir)"
- name: Cache dependencies
uses: actions/cache@v2
with:
path: ${{ steps.composer-cache.outputs.dir }}
key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }}
restore-keys: ${{ runner.os }}-composer-
- name: Install dependencies
run: composer install --prefer-dist --no-progress --ignore-platform-req=ext-*
- name: ensure existance of ./app/code/local
run: mkdir -p app/code/local
- name: PHPStan Static Analysis
run: php vendor/bin/phpstan.phar analyze -c ${{ matrix.config_files }}
continue-on-error: ${{ matrix.config_files == '.github/phpstan_experimental_level.neon' }}