feat: add installable WordPress plugin #9
This file contains hidden or 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 Lint | |
| on: | |
| push: | |
| branches: [main] | |
| paths: | |
| - '**/*.php' | |
| - '.github/workflows/php-lint.yml' | |
| pull_request: | |
| paths: | |
| - '**/*.php' | |
| - '.github/workflows/php-lint.yml' | |
| workflow_dispatch: | |
| permissions: | |
| contents: read | |
| jobs: | |
| php-lint: | |
| name: PHP syntax | |
| runs-on: ubuntu-latest | |
| strategy: | |
| matrix: | |
| php-version: ['7.4', '8.1', '8.2', '8.3'] | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v7 | |
| - name: Set up PHP | |
| uses: shivammathur/setup-php@v2 | |
| with: | |
| php-version: ${{ matrix.php-version }} | |
| coverage: none | |
| - name: Lint PHP files | |
| shell: bash | |
| run: | | |
| set -euo pipefail | |
| find . -type f -name '*.php' -not -path './vendor/*' -print0 | xargs -0 -n1 php -l |