-
Notifications
You must be signed in to change notification settings - Fork 0
46 lines (39 loc) · 1.03 KB
/
linter.yaml
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
name: linter
on:
push:
branches: [ master ]
pull_request:
jobs:
lint:
runs-on: ubuntu-latest
strategy:
matrix:
php-versions:
- '8.2'
- '8.3'
- '8.4'
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Install PHP
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php-versions }}
- name: Get composer cache directory
id: composer-cache-directory
run: |
composer config cache-dir
echo "::set-output name=dir::$(composer config cache-dir)"
- name: composer cache
uses: actions/cache@v2
with:
path: ${{ steps.composer-cache-directory.outputs.dir }}
key: php-${{ matrix.php-versions }}-composer-${{ hashFiles('**/composer.lock') }}
restore-keys: |
php-${{ matrix.php-versions }}-composer
- name: Compose setup
run: composer install --no-interaction
- name: Lint the code
run: |
PHP_CS_FIXER_IGNORE_ENV=1 \
composer run lint