-
-
Notifications
You must be signed in to change notification settings - Fork 25
55 lines (46 loc) · 1.4 KB
/
code-analysis.yaml
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
52
53
54
55
name: Tests
on:
push:
branches:
- develop
pull_request:
branches:
- develop
concurrency:
group: phpstan-${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
codeAnalysis:
runs-on: ubuntu-latest
name: Code Analysis
env:
extensions: curl, fileinfo, gd, mbstring, openssl, pdo, pdo_sqlite, sqlite3, xml, zip
key: winter-storm-cache-v1.2
steps:
- name: Checkout changes
uses: actions/checkout@v4
- name: Setup extension cache
id: extcache
uses: shivammathur/cache-extensions@v1
with:
php-version: '8.2'
extensions: ${{ env.extensions }}
key: ${{ env.key }}
- name: Cache extensions
uses: actions/cache@v2
with:
path: ${{ steps.extcache.outputs.dir }}
key: ${{ steps.extcache.outputs.key }}
restore-keys: ${{ steps.extcache.outputs.key }}
- name: Install PHP
uses: shivammathur/setup-php@v2
with:
php-version: '8.2'
extensions: ${{ env.extensions }}
coverage: none
- name: Install Composer dependencies
run: composer install --no-interaction --no-progress --no-scripts
- name: Clear phpstan cache
run: ./vendor/bin/phpstan clear-result-cache
- name: Analyse code
run: ./vendor/bin/phpstan analyse --memory-limit=2G --no-progress