Skip to content

Commit 1e82061

Browse files
CI: skip duplicate test runs on PR creation
Prevent workflow from running twice (once on push, once on PR) by adding a condition that skips push events when they have an associated PR. Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
1 parent 7f3417b commit 1e82061

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

.github/workflows/test.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@ on: [push, pull_request]
44

55
jobs:
66
build:
7+
# Skip redundant runs: don't run on push if there's an associated PR
8+
if: github.event_name == 'pull_request' || github.event.pull_request == null
79
runs-on: ubuntu-24.04 # noble equivalent
810

911
strategy:

0 commit comments

Comments
 (0)