Skip to content

Commit

Permalink
Add syntax error check to lint-and-test (#964)
Browse files Browse the repository at this point in the history
  • Loading branch information
szepeviktor authored Feb 26, 2024
1 parent 58f299f commit 676cc26
Showing 1 changed file with 35 additions and 0 deletions.
35 changes: 35 additions & 0 deletions .github/workflows/lint-and-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,41 @@ jobs:
- name: Lint CSS
run: npm run lint:css

syntax-errors:
name: Syntax errors
strategy:
fail-fast: false
matrix:
php-version:
- '7.0'
- '7.1'
- '7.2'
- '7.3'
- '7.4'
- '8.0'
- '8.1'
- '8.2'
- '8.3'
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4

- name: Set up PHP
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php-version }}
coverage: none
tools: parallel-lint

- name: Search for invalid complex curly syntax
run: |
! git grep -e '\${[A-Z_a-z]' -- '*.php'
- name: Check source code for syntax errors
run: |
composer exec --no-interaction -- parallel-lint *.php inc/ tests/
lint-php:
name: PHP Lints
runs-on: ubuntu-latest
Expand Down

0 comments on commit 676cc26

Please sign in to comment.