You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
description = "Run e2e tests against a locally-built realtime image (carries unreleased migrations). Builds the repo, swaps it in for supabase's stock realtime, then runs the suite. e.g. mise run e2e-local -- --test postgres-changes-filters"
80
+
dir = "test/e2e"
81
+
run = """
82
+
set -e
83
+
REF=$(grep -E '^[[:space:]]*project_id' supabase/config.toml | sed -E 's/.*"(.*)".*/\\1/')
84
+
IMAGE=realtime:e2e-local
85
+
RT="supabase_realtime_${REF}"
86
+
87
+
# 1. Build the repo into a local image (Docker layer cache keeps rebuilds cheap).
88
+
docker build -t "$IMAGE" ../..
89
+
90
+
# 2. Bring up the full supabase stack. We use its realtime container only as the source of
91
+
# truth for env vars (JWT secret, DB creds, encryption key, etc.). A prior run may have left
92
+
# realtime swapped out / removed; `supabase start` won't recreate an externally-removed
93
+
# container, so if it's missing we recycle the stack to get a clean one back.
94
+
supabase start
95
+
if ! docker inspect "$RT" >/dev/null 2>&1; then
96
+
echo "realtime container missing (left over from a prior swap); recreating supabase stack..."
97
+
supabase stop >/dev/null 2>&1 || true
98
+
supabase start
99
+
fi
100
+
101
+
# 3. Swap realtime: copy supabase's exact env (via `env` inside their container, so we avoid
102
+
# Go-template braces that collide with mise's templating), drop their container, and run ours
103
+
# under the same name / network / aliases / healthcheck so Kong routes to it unchanged.
0 commit comments