Files
CPLv4.0/.woodpecker.yml
ISA 05c1c9c0cf 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).
2025-08-29 11:45:09 +02:00

32 lines
1.1 KiB
YAML

# .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
- echo "🧩 Installing Playwright (Chromium) into workspace..."
- npx playwright install chromium
- name: run-tests
image: node:22
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 --headless