use .distignore #17
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: PHP Syntax Errors | |
on: | |
push: | |
branches: [ trunk, develop ] | |
pull_request: | |
branches: [ trunk, develop ] | |
jobs: | |
build: | |
strategy: | |
matrix: | |
php: [ 5.6, 7.0, 7.1, 7.2, 7.3, 7.4, 8.0, 8.1, 8.2, 8.3, 8.4 ] # Include all PHP versions between the absolute minimum that shouldn't throw an error and the latest release version. | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Setup proper PHP version | |
uses: shivammathur/setup-php@v2 | |
with: | |
php-version: ${{ matrix.php }} | |
- name: Check all files for syntax errors | |
if: ${{ matrix.php >= 8.2 }} # At least the minimum PHP version required by the plugin. | |
run: find -L $GITHUB_WORKSPACE -path $GITHUB_WORKSPACE/vendor -prune -o -name '*.php' -print0 | xargs -0 -n 1 -P 4 php -l | |
- name: Check bootstrap files for syntax errors | |
if: ${{ matrix.php <= 8.1 }} | |
run: find $GITHUB_WORKSPACE -maxdepth 1 -name 'team51-plugin-scaffold.php' -print0 | xargs -0 -n 1 -P 4 php -l |