Skip to content

Commit af940a7

Browse files
authored
Merge pull request #426 from PyAutoLabs/feature/ci-dedupe
CI: one run per commit (push builds main only)
2 parents 6b6463f + 8ad92c7 commit af940a7

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)