Skip to content

Commit 8ad92c7

Browse files
Jammy2211claude
authored andcommitted
ci: one run per commit — PR events carry CI; pushes build main only
Bare 'on: [push, pull_request]' ran every PR commit's checks twice (push + PR events). Pushes now trigger only on main (post-merge run preserved — Heart's ws_ci gate reads main-HEAD conclusions); a concurrency group cancels superseded runs on PR refs only, never main (cancelled is in Heart's FAILURE_CONCLUSIONS). PyAutoLabs/PyAutoHeart#130. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
1 parent 6b6463f commit 8ad92c7

1 file changed

Lines changed: 11 additions & 1 deletion

File tree

.github/workflows/main.yml

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,17 @@
11
name: Tests
22

3-
on: [push, pull_request]
3+
# One run per commit: PR events carry the CI; pushes only build main
4+
# (Heart's ws_ci gate reads main-HEAD conclusions). Superseded runs are
5+
# cancelled on PR refs only — a cancelled main run would read as red CI
6+
# (cancelled is in Heart's FAILURE_CONCLUSIONS).
7+
on:
8+
push:
9+
branches: [main]
10+
pull_request:
411

12+
concurrency:
13+
group: main-${{ github.ref }}
14+
cancel-in-progress: ${{ github.ref != 'refs/heads/main' }}
515
# Unit tests are defined once, centrally, in PyAutoHeart's reusable workflow
616
# (Heart owns all health/readiness checking). This thin caller preserves PR-time
717
# gating: the `unittest` job is the required status check on this repo.

0 commit comments

Comments
 (0)