mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-08-11 20:30:23 +00:00
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. git-svn-id: https://develop.svn.wordpress.org/trunk@54371 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
@@ -102,10 +102,18 @@ jobs:
|
||||
run: phpcs -i
|
||||
|
||||
- name: Run PHPCS on all Core files
|
||||
run: phpcs -q -n --report=checkstyle | cs2pr
|
||||
continue-on-error: true
|
||||
run: phpcs -n --report-full --report-checkstyle=./.cache/phpcs-report.xml
|
||||
|
||||
- name: Show PHPCS results in PR
|
||||
run: cs2pr ./.cache/phpcs-report.xml
|
||||
|
||||
- name: Check test suite files for warnings
|
||||
run: phpcs tests -q --report=checkstyle | cs2pr
|
||||
continue-on-error: true
|
||||
run: phpcs tests --report-full --report-checkstyle=./.cache/phpcs-tests-report.xml
|
||||
|
||||
- name: Show test suite scan results in PR
|
||||
run: cs2pr ./.cache/phpcs-tests-report.xml
|
||||
|
||||
- name: Ensure version-controlled files are not modified during the tests
|
||||
run: git diff --exit-code
|
||||
|
||||
@@ -97,7 +97,11 @@ jobs:
|
||||
run: phpcs -i
|
||||
|
||||
- name: Run PHP compatibility tests
|
||||
run: phpcs --standard=phpcompat.xml.dist -q --report=checkstyle | cs2pr
|
||||
continue-on-error: true
|
||||
run: phpcs --standard=phpcompat.xml.dist --report-full --report-checkstyle=./.cache/phpcs-compat-report.xml
|
||||
|
||||
- name: Show PHPCompatibility results in PR
|
||||
run: cs2pr ./.cache/phpcs-compat-report.xml
|
||||
|
||||
- name: Ensure version-controlled files are not modified or deleted
|
||||
run: git diff --exit-code
|
||||
|
||||
Reference in New Issue
Block a user