-
Notifications
You must be signed in to change notification settings - Fork 0
56 lines (43 loc) · 1.25 KB
/
code-quality.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
name: Code quality
on:
pull_request:
paths:
- "**.php"
push:
branches: master
paths:
- "**.php"
permissions:
contents: read
jobs:
phpstan:
name: PHPStan
runs-on: ubuntu-22.04
steps:
- name: Checkout code
uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4.1.0
- name: Setup PHP
uses: shivammathur/setup-php@7fdd3ece872ec7ec4c098ae5ab7637d5e0a96067 # v2.26.0
with:
php-version: '8.1'
- name: "Validate composer.json and composer.lock"
run: "composer validate --no-check-publish"
- name: Install dependencies with composer
run: composer install --prefer-dist
- name: Run PHPStan
run: composer lint-phpstan
phpcs:
name: phpcs
runs-on: ubuntu-22.04
steps:
- name: Checkout code
uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4.1.0
- name: Setup PHP
uses: shivammathur/setup-php@7fdd3ece872ec7ec4c098ae5ab7637d5e0a96067 # v2.26.0
with:
php-version: '8.1'
tools: cs2pr
- name: Install dependencies with composer
run: composer install --prefer-dist
- name: Run PHPStan
run: composer lint-phpcs-gh-action