Make WordPress Core


Ignore:
Timestamp:
10/24/2022 04:47:15 PM (16 months ago)
Author:
desrosj
Message:

Build/Test Tools: Ensure PHPCS related workflows are properly marked as failed.

When a ruleset error is encountered during a PHPCodeSniffer scan, an XML report is not generated and cs2pr will exit with a 0.

In this situation, a workflow run will be marked as passing (even though a failure has occurred) due to the presence of continue-on-error.

This adjusts the logic in the Coding Standards and PHP Compatibility workflows to remove the need for the continue-on-error option and ensures all failures are accurately reflected within the GitHub Actions UI.

Follow up to [54371].

Props jrf, TobiasBg.
See #55652.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/.github/workflows/php-compatibility.yml

    r54674 r54678  
    9898
    9999      - name: Run PHP compatibility tests
    100         continue-on-error: true
     100        id: phpcs
    101101        run: phpcs --standard=phpcompat.xml.dist --report-full --report-checkstyle=./.cache/phpcs-compat-report.xml
    102102
    103103      - name: Show PHPCompatibility results in PR
     104        if: ${{ always() && steps.phpcs.outcome == 'failure' }}
    104105        run: cs2pr ./.cache/phpcs-compat-report.xml
    105106
Note: See TracChangeset for help on using the changeset viewer.