From 44bea7dc745d4adab85a74a03a20fd34fc95df54 Mon Sep 17 00:00:00 2001 From: Jammy2211 Date: Thu, 30 Jul 2026 16:25:31 +0100 Subject: [PATCH] =?UTF-8?q?ci:=20one=20run=20per=20commit=20=E2=80=94=20PR?= =?UTF-8?q?=20events=20carry=20CI;=20pushes=20build=20main=20only?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 --- .github/workflows/heart-tests.yml | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/.github/workflows/heart-tests.yml b/.github/workflows/heart-tests.yml index a0d1b34a..5a0677fe 100644 --- a/.github/workflows/heart-tests.yml +++ b/.github/workflows/heart-tests.yml @@ -10,8 +10,18 @@ name: Heart Tests # scheduled health agent's job, not a PR gate. The suite is stdlib + PyYAML # only, so it stays fast and flake-free. -on: [push, pull_request] +# One run per commit: PR events carry the CI; pushes only build main +# (Heart's ws_ci gate reads main-HEAD conclusions). Superseded runs are +# cancelled on PR refs only — a cancelled main run would read as red CI +# (cancelled is in Heart's FAILURE_CONCLUSIONS). +on: + push: + branches: [main] + pull_request: +concurrency: + group: heart-tests-${{ github.ref }} + cancel-in-progress: ${{ github.ref != 'refs/heads/main' }} jobs: pytest: runs-on: ubuntu-latest