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:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user