Skip to content

Commit 8c3cb81

Browse files
Stop CI running twice for every pull request commit (#7)
The workflow triggered on push to every branch and on pull_request, so a branch with an open PR ran the full matrix twice against the same commit. push is now limited to main. Branches get their coverage from their PR, where the run is against the merge result rather than the branch tip, which is the more useful thing to check anyway.
1 parent 9671867 commit 8c3cb81

1 file changed

Lines changed: 6 additions & 1 deletion

File tree

.github/workflows/ci.yml

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,13 @@
11
name: CI
22

3+
# push is limited to the default branch on purpose. Triggering on every branch
4+
# and on pull_request means a branch with an open PR runs the whole matrix
5+
# twice for one commit. Branches get their coverage from their PR, where the run
6+
# is against the merge result rather than the branch tip, and main gets it on
7+
# push.
38
on:
49
push:
5-
branches: ['**']
10+
branches: [main]
611
pull_request:
712
workflow_dispatch:
813

0 commit comments

Comments
 (0)