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