-
-
Notifications
You must be signed in to change notification settings - Fork 1
30 lines (24 loc) · 722 Bytes
/
phpcs.yml
File metadata and controls
30 lines (24 loc) · 722 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
28
29
30
name: Supervisor Coding Standards
on:
pull_request:
jobs:
phpcs:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
with:
fetch-depth: 0
ref: ${{ github.head_ref }}
- name: Setup PHP 7.4 and disable opcache
uses: shivammathur/setup-php@v2
with:
php-version: '7.4'
extensions: :opcache
- name: Composer
run: composer install
- name: Check coding standards
run: |
git checkout main # checkout the main branch so it is available to run the diff
git checkout -
composer run phpcs $(git diff --name-only main..${{ github.head_ref }} -- '*.php')