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.
This commit is contained in:
4
.github/workflows/phpunit.yml
vendored
4
.github/workflows/phpunit.yml
vendored
@@ -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:
|
||||
|
||||
Reference in New Issue
Block a user