Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
GH Actions: show PHPCS results both in log + PR
As it was, results of PHPCS runs would only ever show inline in a commit code view/PR code view. This is confusing as people will often try to find an output log of the run in the GH Actions build log, not realizing the scan results are not available in the GH Actions log. This commit changes the steps in the GH Actions workflows for both the PHPCS run against the WordPress Coding Standards as well as for the run against PHPCompatibility to show the full scan results report in the GH Actions logs **_as well as_** show the results in commit/PR code views and still fail the build correctly when new issues are detected. I've elected to store the (temporary) `phpcs-report.xml` file in the `.cache` subdirectory as that directory is (git/svn)-ignored by default already to prevent this new, temporary file from interfering with the `git diff` check at the end of the workflows. Note: I'm also removing the `-q` (quiet) flag from the PHPCS runs as it could give the misleading impression that nothing happened in the step for a successfull run. The progress report being shown will take away that impression. Refs: * https://github.com/staabm/annotate-pull-request-from-checkstyle#using-php_codesniffer * WordPress/gutenberg#44536 (comment)
- Loading branch information