This repository has been archived by the owner on Sep 26, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
102 lines (96 loc) · 2.87 KB
/
php-lint.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
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
name: PHP Linting
on:
push:
branches: [ main, master, develop ]
pull_request:
branches: [ main, master, develop ]
jobs:
composer-install:
runs-on: ubuntu-22.04
strategy:
max-parallel: 3
matrix:
php-versions: ['8.0', '8.1', '8.2' ]
steps:
- uses: actions/checkout@v2
- uses: actions/cache@v2
with:
path: vendor/
key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }}
restore-keys: ${{ runner.os }}-composer-
- name: Install PHP
uses: shivammathur/setup-php@master
with:
php-version: ${{ matrix.php-versions }}
extensions: zip
- name: Install Dependencies
env:
COMPOSER_AUTH: '{"github-oauth": {"github.com": "${{ secrets.REPO_READ_ONLY_TOKEN }}"}}'
run: composer install -q --no-ansi --no-interaction --no-scripts --no-progress --prefer-dist
php-linting-psr12:
needs:
- composer-install
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v2
- uses: actions/cache@v2
with:
path: vendor/
key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }}
restore-keys: ${{ runner.os }}-composer-
- name: Install PHP
uses: shivammathur/setup-php@master
with:
php-version: ${{ matrix.php-versions }}
- name: Coding style PSR12 Check
run: vendor/bin/phpcs
strategy:
max-parallel: 3
matrix:
php-versions: ['8.0', '8.1', '8.2' ]
php-linting-stan:
needs:
- composer-install
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v2
- uses: actions/cache@v2
with:
path: vendor/
key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }}
restore-keys: ${{ runner.os }}-composer-
- name: Install PHP
uses: shivammathur/setup-php@master
with:
php-version: ${{ matrix.php-versions }}
- name: Copy .env
run: cp -n .env.example .env
- name: Static analysis with PHPStan
run: vendor/bin/phpstan analyse
strategy:
max-parallel: 3
matrix:
php-versions: ['8.0', '8.1', '8.2' ]
php-linting-psalm:
needs:
- composer-install
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v2
- uses: actions/cache@v2
with:
path: vendor/
key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }}
restore-keys: ${{ runner.os }}-composer-
- name: Install PHP
uses: shivammathur/setup-php@master
with:
php-version: ${{ matrix.php-versions }}
- name: Copy .env
run: cp -n .env.example .env
- name: Static analysis with psalm
run: vendor/bin/psalm
strategy:
max-parallel: 3
matrix:
php-versions: ['8.0', '8.1', '8.2' ]