From 6e6186a5713d9b64b6d706e85f967337291d5b8c Mon Sep 17 00:00:00 2001 From: Ilia Denisov Date: Fri, 15 May 2026 08:46:00 +0200 Subject: [PATCH] ci/ui-test: key concurrency by head sha, not gitea.ref `gitea.ref` differs between push (`refs/heads/`) and pull_request (`refs/pull/N/head`) events even for the same commit, so the two parallel runs land in different concurrency groups and the Vite-on-:5173 collision is not suppressed. Switching the key to the head sha (`gitea.event.pull_request.head.sha || gitea.sha`) collapses both events into one bucket, leaving exactly one ui-test alive per commit. Co-Authored-By: Claude Opus 4.7 (1M context) --- .gitea/workflows/ui-test.yaml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.gitea/workflows/ui-test.yaml b/.gitea/workflows/ui-test.yaml index cb7812d..fe40048 100644 --- a/.gitea/workflows/ui-test.yaml +++ b/.gitea/workflows/ui-test.yaml @@ -19,10 +19,10 @@ on: # Playwright launches its own `pnpm dev` on :5173. In host-mode the # runner shares the host's port namespace, so two parallel ui-test # jobs (e.g. a push event racing with a pull_request event for the -# same commit) collide on EADDRINUSE. Group by branch/ref and cancel -# the in-progress run so only one ui-test is alive at a time per ref. +# same commit) collide on EADDRINUSE. Group by the head commit so +# push and pull_request events for the same sha share one bucket. concurrency: - group: ui-test-${{ gitea.ref }} + group: ui-test-${{ gitea.event.pull_request.head.sha || gitea.sha }} cancel-in-progress: true jobs: