-
Notifications
You must be signed in to change notification settings - Fork 1
43 lines (37 loc) · 1.22 KB
/
static_analysis.yml
File metadata and controls
43 lines (37 loc) · 1.22 KB
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
name: static_analysis
on:
pull_request:
# Run on push, but only if PHP files have changed
push:
branches: [ main, develop ]
paths:
- '**.php'
- 'composer.json'
- 'composer.lock'
- 'phpstan.neon'
- '.github/workflows/static_analysis.yml'
env:
GITHUB_ACTIONS_NOTIFY_ON_FAILURE: false
jobs:
phpstan:
name: Static Analysis
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: '8.5'
- name: Cache Composer dependencies
uses: actions/cache@v4
with:
path: vendor
key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.json') }}
restore-keys: |
${{ runner.os }}-composer-
- name: Install Composer dependencies
run: composer update --no-interaction --prefer-dist
- name: Run PHPStan
run: composer analyse
continue-on-error: true