From 4dd25844aa7b0124b869e8036d0f6e52e94a57b0 Mon Sep 17 00:00:00 2001 From: Damian Taggart <4309872+attackant@users.noreply.github.com> Date: Tue, 31 Oct 2023 08:56:59 -0600 Subject: [PATCH] Update GitHub Actions to refine pull request triggers This commit updates the GitHub workflow for PHPunit, PHPCS, and node tests. The workflows are now triggered only pull requests towards the develop branch and exclude draft pull requests. This prevents unnecessary running of these workflows on every pull request. Additionally, the PHP version for PHPCS has been updated from 8.0 to 8.2 to align with the latest PHP version usage. --- .github/workflows/node-tests.yml | 4 ++++ .github/workflows/phpcs.yml | 2 +- .github/workflows/phpunit.yml | 4 ++++ 3 files changed, 9 insertions(+), 1 deletion(-) diff --git a/.github/workflows/node-tests.yml b/.github/workflows/node-tests.yml index 6251c548..e0c79509 100644 --- a/.github/workflows/node-tests.yml +++ b/.github/workflows/node-tests.yml @@ -2,9 +2,13 @@ name: Node Tests on: pull_request: + branches: + - develop + types: [ opened, synchronize, reopened, ready_for_review ] jobs: node-tests: + if: github.event.pull_request.draft == false uses: alleyinteractive/.github/.github/workflows/node-tests.yml@main with: ci: true diff --git a/.github/workflows/phpcs.yml b/.github/workflows/phpcs.yml index 6929e16a..1ebaa122 100644 --- a/.github/workflows/phpcs.yml +++ b/.github/workflows/phpcs.yml @@ -10,7 +10,7 @@ jobs: phpcs: strategy: matrix: - php: [ 8.0 ] + php: [ 8.2 ] if: github.event.pull_request.draft == false uses: alleyinteractive/.github/.github/workflows/php-coding-standards.yml@main with: diff --git a/.github/workflows/phpunit.yml b/.github/workflows/phpunit.yml index 48e674cc..7abb72b5 100644 --- a/.github/workflows/phpunit.yml +++ b/.github/workflows/phpunit.yml @@ -2,6 +2,9 @@ name: Testing Suite on: pull_request: + branches: + - develop + types: [ opened, synchronize, reopened, ready_for_review ] jobs: php-tests: @@ -9,6 +12,7 @@ jobs: matrix: php: ['8.2', '8.1', '8.0', '7.4'] wordpress: ["latest"] + if: github.event.pull_request.draft == false uses: alleyinteractive/.github/.github/workflows/php-tests.yml@main with: command: "test"