-
-
Notifications
You must be signed in to change notification settings - Fork 506
48 lines (42 loc) · 1.02 KB
/
php-lint.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
name: PHP lint
on:
push:
branches:
- master
- 2.x
paths:
- '**.php'
- '**composer.json'
pull_request:
branches:
- master
- 2.x
paths:
- '**.php'
- '**composer.json'
types:
- opened
- synchronize
- ready_for_review
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
php-lint:
name: PHP lint
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Install dependencies
uses: ./.github/actions/setup
with:
PHP_TOOLS: 'parallel-lint,cs2pr'
INSTALL_DEPS: false
- name: Get changed files
id: changed-files
uses: tj-actions/changed-files@v44
with:
files: '**.php'
- name: Run PHP lint
if: steps.changed-files.outputs.all_changed_files != ''
run: parallel-lint --exclude .git --exclude vendor --checkstyle ${{ join(steps.changed-files.outputs.all_changed_files, ' ') }} | cs2pr