Headless wird sicher erzwungen (auch wenn lokal anders).

Der Next.js-Server wird gebaut und via npm start im selben Container gestartet (statt npm run dev).

Robustere Browser-Flags für Container.

Artefakte (Trace/Screenshot/Video) nur bei Fehlern, damit der CI schnell bleibt.

baseURL kommt aus ENV (E2E_BASE_URL) – lokal bleibt’s http://localhost:3000.

PLAYWRIGHT_BROWSERS_PATH=0 bleibt (Option B).
This commit is contained in:
ISA
2025-08-29 11:45:09 +02:00
parent 9f43fdc820
commit 05c1c9c0cf
7 changed files with 61 additions and 21 deletions

View File

@@ -1,10 +1,14 @@
# .woodpecker.yml — Option B (Browser im Workspace)
# .woodpecker.yml — Option B (Browser im Workspace, stabil für CI)
steps:
- name: install-dependencies-and-browsers
image: node:22
environment:
PLAYWRIGHT_BROWSERS_PATH: "0" # Browser in ./node_modules/playwright/.local-browsers
CI: "true"
E2E_BASE_URL: "http://localhost:3000"
LANG: "C.UTF-8"
TZ: "Europe/Berlin"
PW_HEADLESS: "1" # erzwingt headless in der Config
commands:
- echo "📦 Installing deps..."
- npm ci
@@ -16,8 +20,12 @@ steps:
environment:
PLAYWRIGHT_BROWSERS_PATH: "0" # gleicher Pfad wie oben
CI: "true"
E2E_BASE_URL: "http://localhost:3000"
LANG: "C.UTF-8"
TZ: "Europe/Berlin"
PW_HEADLESS: "1"
commands:
- echo "🔧 Installing system dependencies for Playwright..."
- npx playwright install-deps
- echo "🧪 Running Playwright tests (Chromium only)..."
- npx playwright test --project=chromium
- npx playwright test --project=chromium --headless