-
Notifications
You must be signed in to change notification settings - Fork 9
48 lines (48 loc) · 1.23 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
name: PHPStan
on:
workflow_dispatch:
pull_request:
branches:
- master
paths-ignore:
- '**.md'
push:
branches:
- master
paths-ignore:
- '**.md'
jobs:
run:
name: Run
runs-on: ubuntu-20.04
strategy:
fail-fast: false
env:
key: cache-v1
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Setup PHP with tools
uses: shivammathur/setup-php@v2
with:
php-version: '8.2'
extensions: mbstring, intl, opcache, xdebug, xml
tools: composer, cs2pr
- name: Get Composer cache directory
id: composer-cache-dir
run: |
echo "::set-output name=dir::$(composer config cache-files-dir)"
- name: Restore composer cache
id: composer-cache
uses: actions/cache@v3
with:
path: ${{ steps.composer-cache-dir.outputs.dir }}
key: ${{ runner.os }}-composer-${{ hashFiles('composer.lock') }}
restore-keys: |
${{ runner.os }}-composer-
- name: Remove composer.lock
run: rm -f composer.lock
- name: Setup Composer
run: composer install
- name: Run PHPStan analysis
run: vendor/bin/phpstan analyse