From 369810e06b7170fd6f4aac0ab28e114cc1bd4b1f Mon Sep 17 00:00:00 2001 From: Caleb Allen Date: Mon, 17 Aug 2026 15:44:00 -0400 Subject: [PATCH] ci: stop testing every commit twice on a runner there is one of A branch push and its pull request are the same commit. With `branches: ['**']` alongside `pull_request:`, opening a PR booked four runs -- check and e2e for the branch, then both again for refs/pull/N/head -- and this host has capacity 1, shared with an index build that can hold it for three hours. PR #1's own checks queued two runs deep behind exactly that. `pull_request` covers feature branches. `main` stays because a post-merge run is the record of the trunk's health, and now that main refuses direct pushes it happens exactly once per merge. The trade is that a branch pushed with no PR open gets no CI. That matches the workflow this repo just committed to, and the signal returns on the same commit the moment a PR exists. Co-Authored-By: Claude Opus 5 (1M context) Claude-Session: https://claude.ai/code/session_01AfVYUVExXsx1nSWrXN8mAh --- .gitea/workflows/ci.yml | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/.gitea/workflows/ci.yml b/.gitea/workflows/ci.yml index 85fd4dd..7f57cc0 100644 --- a/.gitea/workflows/ci.yml +++ b/.gitea/workflows/ci.yml @@ -9,9 +9,23 @@ name: CI # before being written here, so every step below is a transcription of # something observed working rather than something expected to. +# **A branch push and its PR are the same commit, and testing it twice +# costs the only runner there is.** `branches: ['**']` here meant every +# PR booked four runs — `check` and `e2e` for the branch push, then both +# again for `refs/pull/N/head` — on a host with capacity 1, where the +# queue is shared with an index build that can hold it for three hours. +# +# `pull_request` covers feature branches, and `main` is kept because a +# post-merge run is the record of the trunk's health. Since main now +# refuses direct pushes, that run happens exactly once per merge. +# +# The trade is explicit: a branch pushed with **no** PR open gets no CI. +# That is consistent with the workflow this repo committed to — every +# change goes through a PR — and the signal returns the moment one is +# opened, on the same commit. on: push: - branches: ['**'] + branches: [main] pull_request: workflow_dispatch: