Skip to content

Commit 04b644e

Browse files
committed
lint all files with GitHub Actions
1 parent 756096c commit 04b644e

File tree

1 file changed

+49
-0
lines changed

1 file changed

+49
-0
lines changed

.github/workflows/ci.yaml

Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
name: 'CI'
2+
3+
on:
4+
- 'push'
5+
- 'pull_request'
6+
7+
jobs:
8+
tests:
9+
name: 'Lint files'
10+
11+
runs-on: 'ubuntu-latest'
12+
13+
strategy:
14+
matrix:
15+
php-version:
16+
- '5.3'
17+
- '5.4'
18+
- '5.5'
19+
- '5.6'
20+
- '7.0'
21+
- '7.1'
22+
- '7.2'
23+
- '7.3'
24+
- '7.4'
25+
- '8.0'
26+
27+
steps:
28+
- name: 'Check out'
29+
uses: 'actions/checkout@v2'
30+
31+
- name: 'Set up PHP'
32+
uses: 'shivammathur/setup-php@v2'
33+
with:
34+
php-version: '${{ matrix.php-version }}'
35+
coverage: 'none'
36+
37+
- name: 'Get Composer cache directory'
38+
id: 'composer-cache'
39+
run: 'echo "::set-output name=cache-dir::$(composer config cache-files-dir)"'
40+
41+
- name: 'Cache dependencies'
42+
uses: 'actions/cache@v2'
43+
with:
44+
path: '${{ steps.composer-cache.outputs.cache-dir }}'
45+
key: "php-${{ matrix.php-version }}-composer-locked-${{ hashFiles('composer.lock') }}"
46+
restore-keys: 'php-${{ matrix.php-version }}-composer-locked-'
47+
48+
- name: 'Lint PHP files'
49+
run: 'find src -type f -name "*.php" -exec php -l {} \; | (! grep -v "No syntax errors detected" )'

0 commit comments

Comments
 (0)