Make WordPress Core

Changeset 54371


Ignore:
Timestamp:
10/04/2022 12:43:30 AM (2 years ago)
Author:
desrosj
Message:

Build/Test Tools: Display PHPCS results in the GitHub Action logs.

When running PHPCS scans (both for checking coding standards and PHP version compatibility), the results are currently only returned silently in a format that GitHub can consume for contextually annotating any code being flagged.

This changes workflows using PHPCS to also display the results of each scan in the GitHub Action log, making it easier to find and understand what is causing failures.

Props jrf.
See #55652.

Location:
trunk/.github/workflows
Files:
2 edited

Legend:

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

    r54343 r54371  
    103103
    104104      - name: Run PHPCS on all Core files
    105         run: phpcs -q -n --report=checkstyle | cs2pr
     105        continue-on-error: true
     106        run: phpcs -n --report-full --report-checkstyle=./.cache/phpcs-report.xml
     107
     108      - name: Show PHPCS results in PR
     109        run: cs2pr ./.cache/phpcs-report.xml
    106110
    107111      - name: Check test suite files for warnings
    108         run: phpcs tests -q --report=checkstyle | cs2pr
     112        continue-on-error: true
     113        run: phpcs tests --report-full --report-checkstyle=./.cache/phpcs-tests-report.xml
     114
     115      - name: Show test suite scan results in PR
     116        run: cs2pr ./.cache/phpcs-tests-report.xml
    109117
    110118      - name: Ensure version-controlled files are not modified during the tests
  • trunk/.github/workflows/php-compatibility.yml

    r54343 r54371  
    9898
    9999      - name: Run PHP compatibility tests
    100         run: phpcs --standard=phpcompat.xml.dist -q --report=checkstyle | cs2pr
     100        continue-on-error: true
     101        run: phpcs --standard=phpcompat.xml.dist --report-full --report-checkstyle=./.cache/phpcs-compat-report.xml
     102
     103      - name: Show PHPCompatibility results in PR
     104        run: cs2pr ./.cache/phpcs-compat-report.xml
    101105
    102106      - name: Ensure version-controlled files are not modified or deleted
Note: See TracChangeset for help on using the changeset viewer.