Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit 89c901b

Browse files
committed
GH Actions: harden the workflow against PHPCS ruleset errors
If there is a ruleset error, the `cs2pr` action doesn't receive an `xml` report and exits with a `0` error code, even though the PHPCS run failed (though not on CS errors, but on a ruleset error). This changes the GH Actions workflow to allow for that situation and still fail the build in that case.
1 parent a829c57 commit 89c901b

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

‎.github/workflows/check-cs.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,9 @@ jobs:
4040
composer update --prefer-dist --no-suggest --no-progress --no-interaction
4141
4242
- name: Check Code Style
43+
id: phpcs
4344
run: vendor/bin/phpcs --report-full --report-checkstyle=./phpcs-report.xml
4445

4546
- name: Show PHPCS results in PR
47+
if: ${{ always() && steps.phpcs.outcome == 'failure' }}
4648
run: cs2pr ./phpcs-report.xml

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /