-
Notifications
You must be signed in to change notification settings - Fork 41
27 lines (24 loc) · 844 Bytes
/
phpcs.yml
File metadata and controls
27 lines (24 loc) · 844 Bytes
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
on:
# Trigger the workflow on push or pull request,
# but only for the main branch
push:
branches:
- master
pull_request:
types: [ opened, labeled, synchronize ]
name: Inspections
jobs:
runPHPCSInspection:
if: contains(github.event.pull_request.labels.*.name, 'run analysis')
name: Run PHPCS inspection
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4.1.1
- name: Install dependencies
run: composer install --dev --prefer-dist --no-progress
- name: Register custom PHPCS sniffs
run: |
CURRENT_PATHS=$(./vendor/bin/phpcs --config-show | grep 'installed_paths' | cut -d' ' -f2)
./vendor/bin/phpcs --config-set installed_paths "$CURRENT_PATHS,../../../phpcs-sniffs"
- name: PHPCS check
run: ./vendor/bin/phpcs --parallel=10 ./