From f24239915e70e63449e6c29c80ced5f458000b77 Mon Sep 17 00:00:00 2001 From: m96-chan Date: Tue, 15 Sep 2026 00:21:16 +0900 Subject: [PATCH] ci: run on pushes to main, now that nothing requires a check before merging MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit main's required status check was removed to stop pull requests waiting on a 45-minute run. That also removed the only thing verifying what reaches main, so a merge can now land with nothing having reported on it at all. This does not restore the gate — it cannot, a push is after the fact. What it restores is attribution: a break on main is reported against the commit that caused it rather than discovered by whoever opens the next pull request. Two details that matter for a push trigger: `cancel-in-progress` is now conditional. A pull request superseding its own earlier run is what that setting is for; main superseding its own is not. If a merge cancelled the run verifying the merge before it, a break could land with nothing ever having reported on it, which is the case this exists to cover. The concurrency group keys on the pull request number where there is one and the commit otherwise, so two pushes to main never share a group. It also warms the caches, which is worth more here than it looks. A `pull_request` run writes its cache into `refs/pull/N/merge`, and no other pull request can read that scope — five identical libghostty-vt entries existed under five different pull requests, none of them reachable, so every pull request was installing Zig and compiling the same pinned revision from scratch. A run on main writes where they can all restore from. Co-Authored-By: Claude Opus 5 (1M context) --- .github/workflows/ci.yml | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index a003cf9..6aba008 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -2,10 +2,21 @@ name: Build and test on: pull_request: + # main is no longer covered by a required status check, so a merge can land without anything + # having reported on it. This is what reports: it will not stop a break getting in, but it + # names the commit that caused one instead of leaving it to be discovered later. + # + # It also warms the caches. A `pull_request` run writes into `refs/pull/N/merge`, which no + # other pull request can read, so every one of them was rebuilding libghostty-vt from source. + # A run on main writes where they can all restore from. + push: + branches: [main] concurrency: - group: ci-pr-${{ github.event.pull_request.number }} - cancel-in-progress: true + # A pull request supersedes its own earlier runs. main does not: a merge must not cancel the + # run verifying the merge before it, or a break lands with nothing having reported on it. + group: ci-${{ github.event.pull_request.number || github.sha }} + cancel-in-progress: ${{ github.event_name == 'pull_request' }} permissions: contents: read