Compare commits
4 Commits
9d65bf5157
...
faf598b2cd
| Author | SHA1 | Date | |
|---|---|---|---|
| faf598b2cd | |||
| 6e6186a571 | |||
| e3bb30201d | |||
| 7ff81de2b6 |
@@ -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 the head commit so
|
||||||
|
# push and pull_request events for the same sha share one bucket.
|
||||||
|
concurrency:
|
||||||
|
group: ui-test-${{ gitea.event.pull_request.head.sha || gitea.sha }}
|
||||||
|
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
|
||||||
|
|||||||
@@ -5,7 +5,13 @@ export default defineConfig({
|
|||||||
testDir: "tests/e2e",
|
testDir: "tests/e2e",
|
||||||
fullyParallel: true,
|
fullyParallel: true,
|
||||||
forbidOnly: !!process.env.CI,
|
forbidOnly: !!process.env.CI,
|
||||||
retries: process.env.CI ? 1 : 0,
|
// host-mode CI runner shares CPU/IO with the long-lived dev stack,
|
||||||
|
// gitea, and the user's host Caddy. The default 6 workers + 1
|
||||||
|
// retry produced ~7 flakies + 1 hard fail per ui-test run; cap at
|
||||||
|
// 4 workers (still parallel) and allow 4 retries to ride out
|
||||||
|
// transient timing hiccups without inflating wall time.
|
||||||
|
workers: 4,
|
||||||
|
retries: process.env.CI ? 4 : 0,
|
||||||
reporter: [["list"], ["html", { open: "never" }]],
|
reporter: [["list"], ["html", { open: "never" }]],
|
||||||
use: {
|
use: {
|
||||||
baseURL: "http://localhost:5173",
|
baseURL: "http://localhost:5173",
|
||||||
|
|||||||
Reference in New Issue
Block a user