-
Notifications
You must be signed in to change notification settings - Fork 0
49 lines (38 loc) · 1.47 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
45
46
47
48
49
name: Static Analysis
on:
push:
paths-ignore:
- 'docs/**'
pull_request:
paths-ignore:
- 'docs/**'
jobs:
static-analysis:
if: github.actor != 'dependabot[bot]' && github.actor != 'renovate[bot]'
name: "PHPStan"
runs-on: "ubuntu-latest"
steps:
- name: "Checkout code"
uses: "actions/checkout@v4"
- name: "Install PHP"
uses: "shivammathur/setup-php@v2"
with:
coverage: "none"
php-version: 8.1
extensions: mbstring, xml, ctype, iconv, intl, json
ini-values: "memory_limit=-1"
tools: flex,pecl,cs2pr
- name: "Install dependencies with Composer"
uses: "ramsey/composer-install@v2"
- name: "Install phpstan tool with Composer"
uses: "ramsey/composer-install@v2"
with:
working-directory: "tools/phpstan"
- name: "Install php-cs-fixer tool with Composer"
uses: "ramsey/composer-install@v2"
with:
working-directory: "tools/php-cs-fixer"
- name: "Run a static analysis with phpstan/phpstan"
run: "php tools/phpstan/vendor/bin/phpstan analyse --error-format=github"
- name: "Run PHP-CS-Fixer"
run: "php tools/php-cs-fixer/vendor/bin/php-cs-fixer fix --dry-run --diff"