-
Notifications
You must be signed in to change notification settings - Fork 2
37 lines (29 loc) · 833 Bytes
/
php.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
name: PHP Lint Check
on:
push:
branches: [ "unittest" ]
pull_request:
branches: [ "unittest" ]
permissions:
contents: read
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Install PHP
uses: shivammathur/setup-php@v2
with:
php-version: '7.4'
extensions: mbstring, xml, ctype, iconv, intl, pdo, pdo_mysql, dom, filter, gd, json, libxml
coverage: xdebug
- name: PHP lint
run: |
lint_errors=$(find app kero/sine -type f -name "*.php" -exec php -l {} \; 2>&1)
echo "$lint_errors"
if grep -q "Parse error" <<< "$lint_errors"; then
exit 1
fi
- name: Run PHPUnit tests
run: vendor/bin/phpunit --configuration phpunit.xml --testsuite Dev