-
Notifications
You must be signed in to change notification settings - Fork 63
54 lines (43 loc) · 1.48 KB
/
phpcs.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
name: PHP Coding Standard
on:
push:
branches:
- 'master'
pull_request:
branches:
- '*'
permissions:
contents: read
jobs:
phpcs:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
php-version:
- '7.4'
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Install PHP with extensions
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php-version }}
ini-values: assert.exception=1, zend.assertions=1, error_reporting=-1, log_errors_max_len=0, display_errors=On
tools: composer
- name: Composer get cache directory
id: composer-cache
run: echo "dir=$(composer config cache-files-dir)" >> $GITHUB_OUTPUT
- name: Cache Composer
uses: actions/cache@v3
with:
path: ${{ steps.composer-cache.outputs.dir }}
key: ${{ runner.os }}-php${{ matrix.php-version }}-composer-${{ hashFiles('**/composer.json') }}
restore-keys: |
${{ runner.os }}-php${{ matrix.php-version }}-composer-
- name: Install Composer Packages
run: composer install --no-ansi --no-interaction --no-progress --ignore-platform-req=php
- name: Install CodeSniffer Rule
run: vendors/bin/phpcs --config-set installed_paths vendors/cakephp/cakephp-codesniffer
- name: Check CodeSniffer
run: vendors/bin/phpcs -p --extensions=php --standard=ruleset.xml ./lib/Cake