-
Notifications
You must be signed in to change notification settings - Fork 23
43 lines (32 loc) · 953 Bytes
/
static-analysis.yml
File metadata and controls
43 lines (32 loc) · 953 Bytes
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
name: Static analysis
on:
push:
branches: [ master ]
pull_request:
branches: [ master ]
jobs:
phpcs:
name: Code style
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v5
- name: Install PHP
uses: shivammathur/setup-php@v2
with:
php-version: '8.1'
ini-values: memory_limit=-1, date.timezone='UTC'
tools: phpcs, phpstan
- name: Validate composer.json
run: composer validate
- name: Install dependencies
run: composer update
- name: Generate action files
run: vendor/bin/codecept build
- name: Check production code style
run: phpcs src/
- name: Check test code style
run: phpcs tests/ --standard=tests/phpcs.xml
- name: Static analysis of production code
run: phpstan analyze src/ --level=1
- name: Static analysis of test code
run: phpstan analyze tests/