Merge pull request 'CI: one e2e at a time across every PR' (#170) from e2e-one-at-a-time into main
CI / checks (push) Failing after 2m42s
CI / e2e (push) Skipped

This commit was merged in pull request #170.
This commit is contained in:
dev-agent committed 2026-10-19 22:30:14 +00:00
commit 9150c4ac92
2 files changed
+23

No files matched your search

+7
View File
@@ -108,6 +108,13 @@ jobs:
|| contains(github.event.pull_request.labels.*.name, 'e2e:full')) || contains(github.event.pull_request.labels.*.name, 'e2e:full'))
needs: checks needs: checks
runs-on: ubuntu-latest 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 timeout-minutes: 90
steps: steps:
- uses: actions/checkout@v4 - uses: actions/checkout@v4
+16
View File
@@ -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