--- /dev/null
+name: PHP Syntax Check
+
+on:
+ push:
+ pull_request:
+
+jobs:
+ check:
+ runs-on: ubuntu-latest
+ strategy:
+ fail-fast: false
+ matrix:
+ php:
+ - '7.0'
+ - '7.1'
+ - '7.2'
+ - '7.3'
+ - '7.4'
+ - '8.0'
+ steps:
+ - name: Set up PHP
+ uses: shivammathur/setup-php@v2
+ with:
+ php-version: ${{ matrix.php }}
+ - uses: actions/checkout@v2
+ - run: echo "::add-matcher::.github/php-syntax.json"
+ - name: Remove files to be ignored
+ run: |
+ true
+ - run: |
+ ! find . -type f -name '*.php' -exec php -l '{}' \; 2>&1 |grep -v '^No syntax errors detected'
before_script:
- git clone --branch=master --depth=1 --quiet git://github.com/WoltLab/WCF.git WCF
script:
- - find files -type f -name '*.php' |xargs -I file php -l file
- phpcs -p --extensions=php --standard="`pwd`/WCF/CodeSniff/WCF" files