Qual: Always run phpcin pre-commit workflow

# Qual: Always run phpcs in pre-commit workflow

Developers are prioritizing the Travis Run because the pre-commit workflow
only runs the phpcs checks if the other pre-commit checks did not fail.
This modifies the action so that the phpcs checks are also run if the
previous step failed.

That should help limit travis load and delays.
This commit is contained in:
MDW
2024-03-18 17:59:44 +01:00
parent 79b236ec08
commit a08f330ca7

View File

@@ -67,13 +67,16 @@ jobs:
uses: shivammathur/setup-php@v2
# Install when we're going to run phpcs
if: |
steps.changed-php.outputs.any_changed == 'true'
||
! cancelled() &&
(
github.event_name == 'push'
&& (
github.event.ref == 'refs/heads/develop'
|| endsWith(github.event.ref, '.0')
steps.changed-php.outputs.any_changed == 'true'
||
(
github.event_name == 'push'
&& (
github.event.ref == 'refs/heads/develop'
|| endsWith(github.event.ref, '.0')
)
)
)
with:
@@ -82,7 +85,7 @@ jobs:
tools: phpcs
- name: Run some pre-commit hooks on selected changed files only
if: steps.changed-php.outputs.any_changed == 'true'
if: "! cancelled() && steps.changed-php.outputs.any_changed == 'true'"
env:
ALL_CHANGED_FILES: ${{ steps.changed-php.outputs.all_changed_files }}
run: |