-
Notifications
You must be signed in to change notification settings - Fork 135
56 lines (47 loc) · 1.37 KB
/
php-lint.yml
File metadata and controls
56 lines (47 loc) · 1.37 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
47
48
49
50
51
52
53
54
55
56
name: PHP Lint
on:
push:
paths:
- '**.php'
- 'composer.json'
- 'composer.lock'
- '.phpcs.xml.dist'
- '.github/workflows/php-lint.yml'
pull_request:
branches: [develop, main]
paths:
- '**.php'
- 'composer.json'
- 'composer.lock'
- '.phpcs.xml.dist'
- '.github/workflows/php-lint.yml'
workflow_dispatch:
# Disable all permissions by default; grant minimal permissions per job
permissions: {}
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
lint:
name: PHP Syntax and Coding Standards
runs-on: ubuntu-latest
permissions:
contents: read
steps:
- name: Checkout code
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
with:
persist-credentials: false
- name: Setup PHP
uses: shivammathur/setup-php@44454db4f0199b8b9685a5d763dc37cbf79108e1 # 2.36.0
with:
php-version: '8.2'
tools: composer, cs2pr
- name: Install Composer dependencies
uses: ramsey/composer-install@3cf229dc2919194e9e36783941438d17239e8520 # 3.1.1
with:
composer-options: --prefer-dist --no-progress
- name: PHP syntax lint
run: composer lint-ci | cs2pr
- name: PHP coding standards
run: composer cs -- --report=checkstyle | cs2pr