New: React-based admin UI with REST API #84
Workflow file for this run
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: | |
| pull_request: | |
| workflow_dispatch: | |
| workflow_call: | |
| concurrency: | |
| cancel-in-progress: true | |
| group: phpcs-${{ github.ref }} | |
| permissions: | |
| contents: read | |
| jobs: | |
| PHP-Code-Standards: | |
| name: Lint PHP files | |
| runs-on: ubuntu-latest | |
| if: "!contains(github.event.head_commit.message, '[skip PHPCS]') || !contains(github.event.head_commit.message, '[skip CI]')" | |
| steps: | |
| - name: Check out source code | |
| uses: actions/checkout@v4 | |
| - name: Set up PHP | |
| uses: shivammathur/setup-php@v2 | |
| with: | |
| php-version: '7.4' | |
| coverage: none | |
| tools: composer, cs2pr, phpcs | |
| env: | |
| fail-fast: 'true' | |
| - name: Log debug information | |
| run: | | |
| export PATH=$HOME/.composer/vendor/bin:$PATH | |
| php --version | |
| phpcs -i | |
| composer --version | |
| - name: Install dependencies | |
| uses: ramsey/composer-install@v3 | |
| - name: Add error matcher | |
| run: echo "::add-matcher::$(pwd)/.github/checkstyle-problem-matcher.json" | |
| - name: Run style check (errors block, warnings annotate) | |
| run: | | |
| export PATH=$HOME/.composer/vendor/bin:$PATH | |
| composer run lint -- --report=checkstyle | |
| # Errors (including EscapeOutput) fail the job; remaining Security sniffs stay warnings | |
| vendor/bin/phpcs --standard=./ruleset.xml --extensions=php --error-severity=0 . --report=checkstyle || true |