-
Notifications
You must be signed in to change notification settings - Fork 0
68 lines (59 loc) · 2.01 KB
/
Copy pathstatic-analysis.yml
File metadata and controls
68 lines (59 loc) · 2.01 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
name: Static analysis
on:
push:
branches: [ "develop" ]
pull_request:
branches: [ "develop" ]
jobs:
phpstan:
name: PHPStan code analysis [PHP ${{ matrix.php }} - ${{ matrix.os }} - ${{ matrix.dependency-version }}]
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ ubuntu-latest ]
php: [8.2, 8.3, 8.4]
#dependency-version: [ prefer-lowest, prefer-stable ]
dependency-version: [ prefer-stable ]
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php }}
extensions: dom, curl
coverage: none
- name: Copy .env
run: php -r "copy('.env.actions', '.env');"
- name: Run composer install
run: composer install --prefer-dist
- name: Run larastan (PHPStan) - Static code analysis
run: ./vendor/bin/phpstan analyse --memory-limit=2G
phpcs:
name: PHPcs PSR check [PHP ${{ matrix.php }} - ${{ matrix.os }} - ${{ matrix.dependency-version }}]
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ ubuntu-latest ]
php: [8.2, 8.3, 8.4]
#dependency-version: [ prefer-lowest, prefer-stable ]
dependency-version: [ prefer-stable ]
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php }}
extensions: dom, curl
coverage: none
- name: Copy .env
run: php -r "copy('.env.actions', '.env');"
- name: Run composer install
run: composer install --prefer-dist
- name: Run phpcs - PSR2 check
# run: ./vendor/bin/phpcs --standard=phpcs.xml src # Run with warnings > This will still trigger failure
run: ./vendor/bin/phpcs --standard=phpcs.xml src -n # To run errors only
# run: ./vendor/bin/phpcs --standard=PSR2 src