This repository has been archived by the owner on Jan 26, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 92
95 lines (88 loc) · 3.28 KB
/
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
name: Code Quality - PHP
on:
pull_request:
branches: [trunk]
push:
branches: [trunk]
jobs:
lint:
name: Parallel lint
runs-on: ubuntu-latest
steps:
# Checkout repository
- name: Checkout
uses: actions/checkout@5a4ac9002d0be2fb38bd78e4b4dbde5606d7042f # v2.3.4
# Setup PHP versions, run checks
- name: PHP setup
uses: shivammathur/setup-php@a7f90656b3be3996d1ec5501e8e25d5d35aa9bb2 # v2.15.0
with:
php-version: 7.4
- name: Get composer cache directory
id: composer-cache
run: |
echo "::set-output name=dir::$(composer config cache-files-dir)"
- name: Cache composer dependencies
uses: actions/cache@c64c572235d810460d0d6876e9c705ad5002b353 # v2.1.6
with:
path: ${{ steps.composer-cache.outputs.dir }}
key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }}
restore-keys: |
${{ runner.os }}-composer-
- name: Install composer packages
run: composer install --no-progress
- name: Check for PHP errors
run: composer lint
phpcs_check:
name: PHPCS check
runs-on: ubuntu-latest
steps:
# Checkout repository
- name: Checkout
uses: actions/checkout@5a4ac9002d0be2fb38bd78e4b4dbde5606d7042f # v2.3.4
# Setup PHP versions, run checks
- name: PHP setup
uses: shivammathur/setup-php@a7f90656b3be3996d1ec5501e8e25d5d35aa9bb2 # v2.15.0
with:
php-version: 7.4
- name: Get composer cache directory
id: composer-cache
run: |
echo "::set-output name=dir::$(composer config cache-files-dir)"
- name: Cache composer dependencies
uses: actions/cache@c64c572235d810460d0d6876e9c705ad5002b353 # v2.1.6
with:
path: ${{ steps.composer-cache.outputs.dir }}
key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }}
restore-keys: |
${{ runner.os }}-composer-
- name: Install composer packages
run: composer install --no-progress
- name: Check coding standards using PHPCS
run: composer standards:check -- --runtime-set ignore_warnings_on_exit true --runtime-set testVersion 5.8-
phpstan_analysis:
name: PHPStan static analysis
runs-on: ubuntu-latest
steps:
# Checkout repository
- name: Checkout
uses: actions/checkout@5a4ac9002d0be2fb38bd78e4b4dbde5606d7042f # v2.3.4
# Setup PHP versions, run checks
- name: PHP setup
uses: shivammathur/setup-php@a7f90656b3be3996d1ec5501e8e25d5d35aa9bb2 # v2.15.0
with:
php-version: 7.4
- name: Get composer cache directory
id: composer-cache
run: |
echo "::set-output name=dir::$(composer config cache-files-dir)"
- name: Cache composer dependencies
uses: actions/cache@c64c572235d810460d0d6876e9c705ad5002b353 # v2.1.6
with:
path: ${{ steps.composer-cache.outputs.dir }}
key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }}
restore-keys: |
${{ runner.os }}-composer-
- name: Install composer packages
run: composer install --no-progress
- name: Run static analysis using PHPStan
run: composer analyze