Make WordPress Core

Changeset 54921


Ignore:
Timestamp:
12/01/2022 08:11:48 PM (17 months ago)
Author:
desrosj
Message:

Build/Test Tools: Improve caching for PHPCS.

This improves the speed of the PHPCS scans between workflow runs in GitHub Action by creating a scan cache file for each unique set of arguments passed to phpcs.

Props jrf.
Fixes #57148. See #53841.

File:
1 edited

Legend:

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

    r54856 r54921  
    8383        uses: actions/cache@9b0c1fce7a93df8e3bb8926b0d6e9d89e92f20a7 # v3.0.11
    8484        with:
    85           path: .cache/phpcs.json
     85          path: |
     86            .cache/phpcs-src.json
     87            .cache/phpcs-tests.json
    8688          key: ${{ runner.os }}-date-${{ steps.get-date.outputs.date }}-phpcs-cache-${{ hashFiles('**/composer.json', 'phpcs.xml.dist') }}
    8789
     
    98100      - name: Run PHPCS on all Core files
    99101        id: phpcs-core
    100         run: phpcs -n --report-full --report-checkstyle=./.cache/phpcs-report.xml
     102        run: phpcs -n --report-full --cache=./.cache/phpcs-src.json --report-checkstyle=./.cache/phpcs-report.xml
    101103
    102104      - name: Show PHPCS results in PR
     
    106108      - name: Check test suite files for warnings
    107109        id: phpcs-tests
    108         run: phpcs tests --report-full --report-checkstyle=./.cache/phpcs-tests-report.xml
     110        run: phpcs tests --report-full --cache=./.cache/phpcs-tests.json --report-checkstyle=./.cache/phpcs-tests-report.xml
    109111
    110112      - name: Show test suite scan results in PR
Note: See TracChangeset for help on using the changeset viewer.