-
Notifications
You must be signed in to change notification settings - Fork 0
44 lines (38 loc) · 1.01 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
name: "Static analysis"
on:
pull_request:
branches:
- main
push:
branches:
- main
jobs:
phpstan:
runs-on: ubuntu-20.04
strategy:
matrix:
php-version: ['7.4', '8.1', '8.2']
name: PHP ${{ matrix.php-version }} Static Analysis
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 1
- name: Install PHP
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php-version }}
tools: composer:v2
coverage: none
fail-fast: true
- name: Cache Composer dependencies
uses: actions/cache@v4
with:
path: vendor
key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }}
restore-keys: |
${{ runner.os }}-composer-
- name: Install dependencies
run: composer install --no-progress --no-suggest --prefer-dist --optimize-autoloader
- name: Run PHPStan
run: composer phpstan