Added: HTML custom field editor #966
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: PHPCS Check | |
| on: | |
| pull_request_target: | |
| paths: | |
| - '**/*.php' # Run only when PHP files change | |
| # Concurrency: Ensure only one instance of this workflow runs per pull request or commit. | |
| # If a new workflow for the same pull request/commit is triggered, the previous one will be canceled. | |
| concurrency: | |
| group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.sha }} | |
| cancel-in-progress: true | |
| jobs: | |
| phpcs: | |
| name: PHPCS Check | |
| runs-on: ubuntu-latest | |
| steps: | |
| # Step 1: Checkout the code from the pull request base branch to ensure we're analyzing the correct changes. | |
| - name: Checkout code | |
| uses: actions/checkout@v3 | |
| with: | |
| # checkout the PR branch, not the base | |
| ref: ${{ github.event.pull_request.head.sha }} | |
| fetch-depth: 0 # ensures full history | |
| # Step 2: Set up PHP 7.4 with necessary configurations. Also, install the "cs2pr" tool for converting PHPCS output into annotations. | |
| - name: Setup PHP | |
| uses: shivammathur/setup-php@v2 | |
| with: | |
| php-version: '7.4' | |
| ini-values: 'memory_limit=1G' | |
| coverage: none | |
| tools: cs2pr | |
| # Step 3: Install all required Composer dependencies for the project. | |
| - name: Install Composer dependencies | |
| run: composer install | |
| # Step 4: Run the PHPCS check using the "composer phpcs" command to detect coding standard violations. | |
| - name: Run PHPCS checks | |
| run: composer phpcs |