ui/frontend: cap Playwright at 4 workers, retry 4 times #8
@@ -16,6 +16,15 @@ on:
|
|||||||
- '.gitea/workflows/ui-test.yaml'
|
- '.gitea/workflows/ui-test.yaml'
|
||||||
- '!**/*.md'
|
- '!**/*.md'
|
||||||
|
|
||||||
|
# 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.
|
||||||
|
concurrency:
|
||||||
|
group: ui-test-${{ gitea.ref }}
|
||||||
|
cancel-in-progress: true
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
test:
|
test:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
@@ -59,6 +68,15 @@ jobs:
|
|||||||
working-directory: ui/frontend
|
working-directory: ui/frontend
|
||||||
run: pnpm test
|
run: pnpm test
|
||||||
|
|
||||||
|
- name: Clear stale Vite from :5173
|
||||||
|
# Defence in depth in case a previous job's webServer survived
|
||||||
|
# the concurrency-cancel — `pkill` does not fail when there is
|
||||||
|
# nothing to kill, and `fuser -k` cleans up anything else
|
||||||
|
# holding the port.
|
||||||
|
run: |
|
||||||
|
pkill -f 'vite dev' || true
|
||||||
|
fuser -k 5173/tcp 2>/dev/null || true
|
||||||
|
|
||||||
- name: Run Playwright
|
- name: Run Playwright
|
||||||
working-directory: ui/frontend
|
working-directory: ui/frontend
|
||||||
run: pnpm exec playwright test
|
run: pnpm exec playwright test
|
||||||
|
|||||||
Reference in New Issue
Block a user