Skip to content

FEAT: adjust codes

FEAT: adjust codes #7

Workflow file for this run

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