From 84ffb1e7aca3fcc22b5b87756bb02dbf3f6d9d49 Mon Sep 17 00:00:00 2001 From: cunninghamcard-bit Date: Thu, 15 Oct 2026 17:37:16 +0800 Subject: [PATCH] ci: run CI on pull requests to any base branch CI ran only on pull requests whose base is master, so a stacked pull request, whose base is the branch of the pull request below it, got no checks at all until everything under it had merged. Every pull request now runs the workflow. "changes" diffs the test merge commit against its first parent, the base branch head, so a stacked pull request is checked for exactly its own layer. Running on every layer of a stack means one push low in the stack queues a run on each pull request above it. A new push to a pull request now cancels its older run. Pushes to master each get their own group, because GitHub also cancels a pending run in a group when another one queues, and "changes" diffs a push only against the one before it: a documentation push queued behind a cancelled code push would have left that code untested on master. Co-Authored-By: Claude Opus 5.5 Claude-Session: https://claude.ai/code/session_0112xDERMUyD5JALkFhnsdWS --- .github/workflows/ci.yml | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index e0ad561c..01dcea4d 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -3,8 +3,18 @@ name: CI on: push: branches: [master] + # Every pull request runs the checks, whatever its base: stacked PRs are + # reviewed against the PR below them. pull_request: - branches: [master] + +# A new push to a pull request cancels its older run. Pushes to master each +# get their own group: GitHub cancels a pending run in a group when another +# one queues, and "changes" only diffs a push against the one before it, so a +# documentation push queued behind a cancelled code push would leave that +# code untested on master. +concurrency: + group: ci-${{ github.workflow }}-${{ github.event.pull_request.number || github.sha }} + cancel-in-progress: ${{ github.event_name == 'pull_request' }} env: CARGO_TERM_COLOR: always