Skip to content

Commit 676cc26

Browse files
authored
Add syntax error check to lint-and-test (#964)
1 parent 58f299f commit 676cc26

1 file changed

Lines changed: 35 additions & 0 deletions

File tree

.github/workflows/lint-and-test.yml

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,41 @@ jobs:
2929
- name: Lint CSS
3030
run: npm run lint:css
3131

32+
syntax-errors:
33+
name: Syntax errors
34+
strategy:
35+
fail-fast: false
36+
matrix:
37+
php-version:
38+
- '7.0'
39+
- '7.1'
40+
- '7.2'
41+
- '7.3'
42+
- '7.4'
43+
- '8.0'
44+
- '8.1'
45+
- '8.2'
46+
- '8.3'
47+
runs-on: ubuntu-latest
48+
steps:
49+
- name: Checkout repository
50+
uses: actions/checkout@v4
51+
52+
- name: Set up PHP
53+
uses: shivammathur/setup-php@v2
54+
with:
55+
php-version: ${{ matrix.php-version }}
56+
coverage: none
57+
tools: parallel-lint
58+
59+
- name: Search for invalid complex curly syntax
60+
run: |
61+
! git grep -e '\${[A-Z_a-z]' -- '*.php'
62+
63+
- name: Check source code for syntax errors
64+
run: |
65+
composer exec --no-interaction -- parallel-lint *.php inc/ tests/
66+
3267
lint-php:
3368
name: PHP Lints
3469
runs-on: ubuntu-latest

0 commit comments

Comments
 (0)