From 210f681ee5ce19ea51ad85130f8ff3b1ccf63b4e Mon Sep 17 00:00:00 2001 From: Don Garrett Date: Mon, 19 Oct 2026 22:23:39 +0000 Subject: [PATCH] CI: one e2e at a time across every PR Gitea now has two runners but there is one 4090. The e2e job joins one concurrency group without cancel-in-progress, so a second PR's e2e waits for the first. checks still run in parallel. Co-Authored-By: Claude Opus 5.5 (1M context) Claude-Session: https://claude.ai/code/session_01J5Utyfzw7gF7UhjRDEtjTk --- .gitea/workflows/ci.yml | 7 +++++++ tests/ci/test_workflow.py | 16 ++++++++++++++++ 2 files changed, 23 insertions(+) create mode 100644 tests/ci/test_workflow.py diff --git a/.gitea/workflows/ci.yml b/.gitea/workflows/ci.yml index d11d675..a467715 100644 --- a/.gitea/workflows/ci.yml +++ b/.gitea/workflows/ci.yml @@ -108,6 +108,13 @@ jobs: || contains(github.event.pull_request.labels.*.name, 'e2e:full')) needs: checks runs-on: ubuntu-latest + # One e2e at a time across every PR and branch: there are two runners + # but one 4090. A second waits for the first instead of sharing the GPU. + # A group holds one running and one waiting job, so a third PR's e2e + # replaces the waiting one, which shows as cancelled: rerun it. + concurrency: + group: nisse-e2e + cancel-in-progress: false timeout-minutes: 90 steps: - uses: actions/checkout@v4 diff --git a/tests/ci/test_workflow.py b/tests/ci/test_workflow.py new file mode 100644 index 0000000..8486d81 --- /dev/null +++ b/tests/ci/test_workflow.py @@ -0,0 +1,16 @@ +"""The CI workflow's settings that matter beyond a single run.""" + +from pathlib import Path + +import yaml + +CI = Path(__file__).parent.parent.parent / ".gitea" / "workflows" / "ci.yml" + + +def test_only_one_e2e_runs_at_a_time() -> None: + """Two runners, one 4090: e2e runs share one group across every PR, + and a run waits for the one before rather than cancelling it.""" + e2e = yaml.safe_load(CI.read_text())["jobs"]["e2e"] + group = e2e["concurrency"]["group"] + assert "${{" not in group # the same group for every PR and branch + assert e2e["concurrency"]["cancel-in-progress"] is False -- 2.54.0