-
-
Notifications
You must be signed in to change notification settings - Fork 90
72 lines (56 loc) · 3.1 KB
/
static-analysis-plugins.yml
File metadata and controls
72 lines (56 loc) · 3.1 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
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
name: Static Analysis Plugins
on: [push, pull_request]
jobs:
qa:
name: Quality Assurance
runs-on: ubuntu-latest
env:
php-version: '8.3'
php-extensions: yaml
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: ${{ env.php-version }}
extensions: ${{ env.php-extensions }}
ini-values: zend.assertions=1
coverage: none # Xdebug is installed by default, so we remove it manually
- name: Creating var directory
run: mkdir -p var/cache
- name: Cache QA results
uses: actions/cache@v4
with:
path: var/cache
key: qa-${{ hashFiles('composer.lock') }}-${{ hashFiles('.github/workflows/static-analysis-plugins.yml') }}
restore-keys: qa-${{ hashFiles('composer.lock') }}-${{ hashFiles('.github/workflows/static-analysis-plugins.yml') }}
- uses: "ramsey/composer-install@v2"
- uses: "ramsey/composer-install@v2"
with:
working-directory: "qa/StaticAnalysis/psalm/v6"
- uses: "ramsey/composer-install@v2"
with:
working-directory: "qa/StaticAnalysis/psalm/v5"
- uses: "ramsey/composer-install@v2"
with:
working-directory: "qa/StaticAnalysis/phpstan/v1"
- uses: "ramsey/composer-install@v2"
with:
working-directory: "qa/StaticAnalysis/phpstan/v2"
- name: Running Psalm v6 (without plugin installed)
run: cd qa/StaticAnalysis/psalm/v6 && php vendor/bin/psalm --config=../../../../tests/StaticAnalysis/psalm-without-plugin.xml --no-cache
- name: Running Psalm v6 (with plugin installed)
run: cd qa/StaticAnalysis/psalm/v6 && php vendor/bin/psalm --config=../../../../tests/StaticAnalysis/psalm-with-plugin.xml --no-cache
- name: Running Psalm v5 (without plugin installed)
run: cd qa/StaticAnalysis/psalm/v5 && php vendor/bin/psalm --config=../../../../tests/StaticAnalysis/psalm-without-plugin.xml --no-cache
- name: Running Psalm v5 (with plugin installed)
run: cd qa/StaticAnalysis/psalm/v5 && php vendor/bin/psalm --config=../../../../tests/StaticAnalysis/psalm-with-plugin.xml --no-cache
- name: Running PHPStan v2 (without extension installed)
run: cd qa/StaticAnalysis/phpstan/v2 && php vendor/bin/phpstan --configuration=../../../../tests/StaticAnalysis/phpstan-without-extension.neon.dist
- name: Running PHPStan v2 (with extension installed)
run: cd qa/StaticAnalysis/phpstan/v2 && php vendor/bin/phpstan --configuration=../../../../tests/StaticAnalysis/phpstan-with-extension.neon.dist
- name: Running PHPStan v1 (without extension installed)
run: cd qa/StaticAnalysis/phpstan/v1 && php vendor/bin/phpstan --configuration=../../../../tests/StaticAnalysis/PHPStan/v1/phpstan-without-extension.neon.dist
- name: Running PHPStan v1 (with extension installed)
run: cd qa/StaticAnalysis/phpstan/v1 && php vendor/bin/phpstan --configuration=../../../../tests/StaticAnalysis/PHPStan/v1/phpstan-with-extension.neon.dist