mirror of
git://develop.git.wordpress.org/
synced 2025-01-17 21:08:44 +01:00
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. git-svn-id: https://develop.svn.wordpress.org/trunk@54678 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
2645177a58
commit
28061cb869
6
.github/workflows/coding-standards.yml
vendored
6
.github/workflows/coding-standards.yml
vendored
@ -102,17 +102,19 @@ jobs:
|
||||
run: phpcs -i
|
||||
|
||||
- name: Run PHPCS on all Core files
|
||||
continue-on-error: true
|
||||
id: phpcs-core
|
||||
run: phpcs -n --report-full --report-checkstyle=./.cache/phpcs-report.xml
|
||||
|
||||
- name: Show PHPCS results in PR
|
||||
if: ${{ always() && steps.phpcs-core.outcome == 'failure' }}
|
||||
run: cs2pr ./.cache/phpcs-report.xml
|
||||
|
||||
- name: Check test suite files for warnings
|
||||
continue-on-error: true
|
||||
id: phpcs-tests
|
||||
run: phpcs tests --report-full --report-checkstyle=./.cache/phpcs-tests-report.xml
|
||||
|
||||
- name: Show test suite scan results in PR
|
||||
if: ${{ always() && steps.phpcs-tests.outcome == 'failure' }}
|
||||
run: cs2pr ./.cache/phpcs-tests-report.xml
|
||||
|
||||
- name: Ensure version-controlled files are not modified during the tests
|
||||
|
3
.github/workflows/php-compatibility.yml
vendored
3
.github/workflows/php-compatibility.yml
vendored
@ -97,10 +97,11 @@ jobs:
|
||||
run: phpcs -i
|
||||
|
||||
- name: Run PHP compatibility tests
|
||||
continue-on-error: true
|
||||
id: phpcs
|
||||
run: phpcs --standard=phpcompat.xml.dist --report-full --report-checkstyle=./.cache/phpcs-compat-report.xml
|
||||
|
||||
- name: Show PHPCompatibility results in PR
|
||||
if: ${{ always() && steps.phpcs.outcome == 'failure' }}
|
||||
run: cs2pr ./.cache/phpcs-compat-report.xml
|
||||
|
||||
- name: Ensure version-controlled files are not modified or deleted
|
||||
|
Loading…
x
Reference in New Issue
Block a user