forked from openemr/openemr
-
Notifications
You must be signed in to change notification settings - Fork 13
38 lines (32 loc) · 876 Bytes
/
syntax.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
name: Syntax
on:
push:
branches: [ master ]
pull_request:
branches: [ master ]
permissions:
contents: read
jobs:
build:
runs-on: ubuntu-22.04
strategy:
fail-fast: false
matrix:
php: ['8.0', '8.1', '8.2', '8.3']
name: PHP ${{ matrix.php }}
steps:
- uses: actions/checkout@v3
- name: Install PHP
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php }}
- name: Report PHP Version
run: php -v
- name: Check PHP Syntax
run: |
failSyntax=false
if find . -type f -name "*.php" -exec php -l {} \; 2>&1 >/dev/null | grep "^"; then failSyntax=true; fi
if find . -type f -name "*.inc" -exec php -l {} \; 2>&1 >/dev/null | grep "^"; then failSyntax=true; fi
if $failSyntax; then
exit 1
fi