forked from humanmade/query-filter
-
Notifications
You must be signed in to change notification settings - Fork 0
46 lines (38 loc) · 1.13 KB
/
Copy pathphp.yml
File metadata and controls
46 lines (38 loc) · 1.13 KB
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
name: PHP Code Quality
on:
pull_request:
types:
- opened
- reopened
- synchronize
- ready_for_review
# Only run when PHP or the coding standards configuration change.
paths:
- '**.php'
- '.phpcs.xml'
- 'composer.json'
- 'composer.lock'
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
phpcs:
name: PHPCS
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
- name: Set up PHP
uses: shivammathur/setup-php@f3e473d116dcccaddc5834248c87452386958240 # 2.37.2
with:
php-version: '8.2'
coverage: none
tools: cs2pr
- name: Install Composer dependencies
run: composer install --no-progress --no-interaction --no-ansi
- name: Run PHPCS
id: phpcs
run: composer phpcs -- --report-full --report-checkstyle=phpcs-report.xml
- name: Annotate PR with PHPCS results
if: ${{ always() && steps.phpcs.outcome == 'failure' }}
run: cs2pr ./phpcs-report.xml