Make WordPress Core

Changeset 58596


Ignore:
Timestamp:
06/28/2024 06:19:51 PM (11 months ago)
Author:
desrosj
Message:

Build/Test Tools: Allow older branches to use Coding Standards workflow.

This updates the reusable coding standards GitHub Actions workflow to support the old way of running PHPCS commands when the old-branches input flag is set to true. This allows the 5.1-5.4 branches to use the same workflow as all other 5.5+ branches.

See #61213.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/.github/workflows/reusable-coding-standards-php.yml

    r58165 r58596  
    1212        type: 'string'
    1313        default: 'latest'
     14      old-branch:
     15        description: 'Whether this is an old branch that runs phpcbf instead of phpcs'
     16        required: false
     17        type: 'boolean'
     18        default: false
    1419
    1520jobs:
     
    7580      - name: Run PHPCS on all Core files
    7681        id: phpcs-core
     82        if: ${{ ! inputs.old-branch }}
    7783        run: phpcs -n --report-full --cache=./.cache/phpcs-src.json --report-checkstyle=./.cache/phpcs-report.xml
    7884
     
    8389      - name: Check test suite files for warnings
    8490        id: phpcs-tests
     91        if: ${{ ! inputs.old-branch }}
    8592        run: phpcs tests --report-full --cache=./.cache/phpcs-tests.json --report-checkstyle=./.cache/phpcs-tests-report.xml
    8693
     
    8996        run: cs2pr ./.cache/phpcs-tests-report.xml
    9097
     98      - name: Run PHPCBF on all Core files (old branches)
     99        if: ${{ inputs.old-branch }}
     100        run: phpcbf
     101
    91102      - name: Ensure version-controlled files are not modified during the tests
    92103        run: git diff --exit-code
Note: See TracChangeset for help on using the changeset viewer.