Skip to content

Commit b1a83e4

Browse files
authored
Add linting GH action
1 parent 2db8d74 commit b1a83e4

File tree

1 file changed

+32
-0
lines changed

1 file changed

+32
-0
lines changed

.github/workflows/lint.yml

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
name: "PHP Lint"
2+
3+
on:
4+
- push
5+
- pull_request
6+
7+
jobs:
8+
tests:
9+
name: "Lint"
10+
11+
runs-on: ubuntu-latest
12+
13+
strategy:
14+
matrix:
15+
php-version:
16+
- "5.3"
17+
- "latest"
18+
19+
steps:
20+
- name: "Checkout"
21+
uses: "actions/checkout@v2"
22+
23+
- name: "Install PHP"
24+
uses: "shivammathur/setup-php@v2"
25+
with:
26+
coverage: "none"
27+
extensions: "intl"
28+
ini-values: "memory_limit=-1, error_reporting=E_ALL, display_errors=On"
29+
php-version: "${{ matrix.php-version }}"
30+
31+
- name: "Lint PHP files"
32+
run: "find src/ -type f -name '*.php' -print0 | xargs -0 -L1 -P4 -- php -l -f"

0 commit comments

Comments
 (0)