forked from ExpressionEngine/ExpressionEngine
-
Notifications
You must be signed in to change notification settings - Fork 0
45 lines (37 loc) · 1.34 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
name: PSR-12
on:
pull_request:
types: [opened, synchronize, reopened, ready_for_review]
branches:
- '*.dev'
- '[0-9]+.[0-9]+.[0-9]+'
- 'release/[0-9]+.[0-9]+.[0-9]+'
jobs:
check:
name: PSR-12 compatibility check
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
with:
ref: ${{ github.event.pull_request.head.sha }}
- name: Get changed files
id: changed_files
uses: tj-actions/changed-files@v35
with:
separator: " "
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: '8.1'
extensions: dom, curl, sqlite, libxml, mbstring, zip, pcntl, pdo, mysql, bcmath, soap, intl, gd, exif, iconv, imagick
coverage: none
tools: phpcs, cs2pr
ini-values: error_log=/home/runner/php_errors.log, memory_limit=512M
- name: Install dependencies
working-directory: build-tools
run: composer install
- name: Check PHP code style
id: check
continue-on-error: true
run: phpcs --standard=phpcs.ruleset.xml --report=checkstyle ${{ steps.changed_files.outputs.all_changed_files }} | cs2pr