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 7e54856

Browse files
jrfnlgrogy
authored andcommitted
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 f363c40 commit 7e54856

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

‎.github/workflows/test.yml‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,10 +34,11 @@ jobs:
3434
uses: ramsey/composer-install@v2
3535

3636
- name: Run code sniffer
37-
continue-on-error: true
37+
id: phpcs
3838
run: vendor/bin/phpcs --report-full --report-checkstyle=./phpcs-report.xml
3939

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

4344
bundle:

0 commit comments

Comments
(0)

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