Shuffle/.forgejo/scripts/e2e-run.sh
cschlaefke 23816377a5
Some checks failed
CI / flutter (pull_request) Successful in 1m15s
CI / web-build (pull_request) Successful in 54s
CI / supabase (pull_request) Successful in 3s
CI / supabase-tests (pull_request) Successful in 30s
CI / e2e (pull_request) Failing after 4m3s
ci(e2e): add Playwright e2e job on docker-host with throttle GoTrue and artifacts
Refs #38

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-11-03 10:45:17 +01:00

31 lines
1.2 KiB
Bash
Executable file

#!/usr/bin/env bash
# Playwright-E2E (Projekte api, web, throttle) gegen den laufenden Supabase-Stack im dind (Issue #38, D2).
# Voraussetzungen: DOCKER_HOST/DOCKER_GW gesetzt, `supabase start` lief, Extra-GoTrue auf :9998 laeuft,
# Web-Build in app/build/web. Die Supabase-Ports liegen im dind; ein TCP-Relay macht sie unter
# 127.0.0.1 erreichbar, wie es die Tests und die Web-App (CORS/Origin, Site-URL localhost:3000) erwarten.
# Der Spike (SPIKE_GOTRUE_URL) laeuft in CI bewusst nicht.
set -euo pipefail
: "${DOCKER_GW:?DOCKER_GW (dind-Gateway) fehlt}"
: "${SUPABASE_ANON_KEY:?SUPABASE_ANON_KEY fehlt}"
node e2e/support/tcp-forward.mjs "$DOCKER_GW" 54321 54322 54324 9998 &
relay=$!
trap 'kill "$relay" 2>/dev/null || true' EXIT
for port in 54321 54322 54324 9998; do
for _ in $(seq 1 20); do
(exec 3<>"/dev/tcp/127.0.0.1/${port}") 2>/dev/null && break
sleep 0.5
done
done
export SUPABASE_URL=http://127.0.0.1:54321
export MAILPIT_URL=http://127.0.0.1:54324
export E2E_DB_URL=postgresql://postgres:postgres@127.0.0.1:54322/postgres
export WEB_URL=http://localhost:3000
export THROTTLE_GOTRUE_URL=http://127.0.0.1:9998
export CI=true
cd e2e
npx playwright test --project=api --project=web --project=throttle