From 6684375ea31b0ca81cec8e96cb62dd8918de3e4c Mon Sep 17 00:00:00 2001 From: marcusquinn <6428977+marcusquinn@users.noreply.github.com> Date: Mon, 24 Nov 2025 23:44:19 +0000 Subject: [PATCH] Fix duplicate CI runs by removing feature/* from push triggers Workflows were running twice for feature branches: once on push and once on pull_request. Now push only triggers for main branch, while feature branches get CI via the pull_request trigger when a PR exists. This prevents duplicate workflow runs and the confusion of having one run pass while another fails for the same commit. --- .github/workflows/code-quality.yml | 4 +++- .github/workflows/phpunit.yml | 4 +++- .github/workflows/playground-tests.yml | 4 +++- 3 files changed, 9 insertions(+), 3 deletions(-) diff --git a/.github/workflows/code-quality.yml b/.github/workflows/code-quality.yml index 23cd2bd..e97c3ff 100644 --- a/.github/workflows/code-quality.yml +++ b/.github/workflows/code-quality.yml @@ -1,8 +1,10 @@ name: Code Quality on: + # Only run on push to main (not feature branches) to avoid duplicate runs. + # Feature branches get CI via pull_request trigger. push: - branches: [ main, feature/* ] + branches: [ main ] pull_request: branches: [ main ] workflow_dispatch: diff --git a/.github/workflows/phpunit.yml b/.github/workflows/phpunit.yml index b89bea8..e4289f8 100644 --- a/.github/workflows/phpunit.yml +++ b/.github/workflows/phpunit.yml @@ -1,8 +1,10 @@ name: PHPUnit Tests on: + # Only run on push to main (not feature branches) to avoid duplicate runs. + # Feature branches get CI via pull_request trigger. push: - branches: [ main, feature/* ] + branches: [ main ] pull_request: branches: [ main ] workflow_dispatch: diff --git a/.github/workflows/playground-tests.yml b/.github/workflows/playground-tests.yml index 50967be..2b71b9c 100644 --- a/.github/workflows/playground-tests.yml +++ b/.github/workflows/playground-tests.yml @@ -8,8 +8,10 @@ name: WordPress Playground Tests # npm run playground:start:multisite on: + # Only run on push to main (not feature branches) to avoid duplicate runs. + # Feature branches get CI via pull_request trigger. push: - branches: [ main, feature/* ] + branches: [ main ] pull_request: branches: [ main ] workflow_dispatch: