Skip to content

Commit

Permalink
Create php-syntax-check.yml (#282)
Browse files Browse the repository at this point in the history
  • Loading branch information
yuliu authored Dec 16, 2021
1 parent 21175e3 commit 755ae59
Showing 1 changed file with 21 additions and 0 deletions.
21 changes: 21 additions & 0 deletions .github/workflows/php-syntax-check.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
name: PHP Syntax Check

on: [push, pull_request]

jobs:
lint:
runs-on: ${{ matrix.operating-system }}
strategy:
matrix:
operating-system: ['ubuntu-latest']
php-versions: ['5.3', '7.4', '8.0'] # PHP 5.3 is the minimum available version, and we choose a version from each branch
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php-versions }}
- name: Lint
run: |
find . -type f -name '*.php' -print0 | xargs -0 -n1 -P4 php -l -n | (! grep -v 'No syntax errors detected')

0 comments on commit 755ae59

Please sign in to comment.