Skip to content

Commit

Permalink
GH Actions: fix fixer conflict check
Browse files Browse the repository at this point in the history
While checking something else, I came across a notice in the GH Actions logs showing that the fixer conflict check was failing.

Some backtracing shows that it has been failing for the past five months since PR 2132 was merged - see: https://github.com/WordPress/WordPress-Coding-Standards/actions/runs/3643130487

Unfortunately, the way the script was set up, this failure was not showing and not failing the builds.

The changes I'm proposing now will fix that.

I've also made sure that once the current fixer conflicts are fixed, the build will properly succeed again: https://github.com/jrfnl/WordPress-Coding-Standards/actions/runs/5048089688/jobs/9055836148

Next up: fix the fixer conflicts and whatever other errors have crept in since the build originally started failing....
  • Loading branch information
jrfnl committed May 28, 2023
1 parent a328aff commit 96b0494
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion .github/workflows/basic-qa.yml
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,15 @@ jobs:
# If only fixable errors are found, the exit code will be 1, which can be interpreted as success.
- name: Test for fixer conflicts (fixes expected)
if: ${{ matrix.phpcs_version == 'dev-master' }}
id: phpcbf
continue-on-error: true
run: |
set +e
$(pwd)/vendor/bin/phpcbf -pq ./WordPress/Tests/ --standard=WordPress --extensions=inc --exclude=Generic.PHP.Syntax --report=summary
if [ $? -eq 1 ]; then exit 0; fi
exitcode="$?"
echo "EXITCODE=$exitcode" >> $GITHUB_OUTPUT
exit "$exitcode"
- name: Fail the build on fixer conflicts and other errors
if: ${{ steps.phpcbf.outputs.EXITCODE != 0 && steps.phpcbf.outputs.EXITCODE != 1 }}
run: exit ${{ steps.phpcbf.outputs.EXITCODE }}

0 comments on commit 96b0494

Please sign in to comment.