-
Notifications
You must be signed in to change notification settings - Fork 0
39 lines (34 loc) · 823 Bytes
/
Copy pathphp-lint.yml
File metadata and controls
39 lines (34 loc) · 823 Bytes
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
name: PHP Lint
on:
push:
branches: [main]
paths:
- '**/*.php'
- '.github/workflows/php-lint.yml'
pull_request:
paths:
- '**/*.php'
- '.github/workflows/php-lint.yml'
workflow_dispatch:
permissions:
contents: read
jobs:
php-lint:
name: PHP syntax
runs-on: ubuntu-latest
strategy:
matrix:
php-version: ['7.4', '8.1', '8.2', '8.3']
steps:
- name: Checkout repository
uses: actions/checkout@v7
- name: Set up PHP
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php-version }}
coverage: none
- name: Lint PHP files
shell: bash
run: |
set -euo pipefail
find . -type f -name '*.php' -not -path './vendor/*' -print0 | xargs -0 -n1 php -l