From a08f330ca72fb62f72ea2bd634593dd981d23443 Mon Sep 17 00:00:00 2001 From: MDW Date: Mon, 18 Mar 2024 17:59:44 +0100 Subject: [PATCH] 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. --- .github/workflows/pre-commit.yml | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) diff --git a/.github/workflows/pre-commit.yml b/.github/workflows/pre-commit.yml index 384ef39880e..ff99f5bdd74 100644 --- a/.github/workflows/pre-commit.yml +++ b/.github/workflows/pre-commit.yml @@ -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: |