From 1fafad4e691f13666be962c22bdd6fa94bd0aaca Mon Sep 17 00:00:00 2001 From: Kevin Riehl Date: Fri, 1 May 2026 16:14:56 -0700 Subject: [PATCH] Hand the CI runner placeholder Supabase env vars MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit lib/supabase.ts calls createClient at module load, and Supabase's URL validator throws when VITE_SUPABASE_URL is undefined — which it is on the Gitea runner. AccountDetail and Transactions tests transitively import TransactionForm → lib/supabase and trip on it; tests that mock lib/supabase directly slip past. Set explicit placeholder values for the Vitest step so the import succeeds; real auth calls are stubbed inside the tests, so the placeholders are never sent over the wire. Co-Authored-By: Claude Opus 4.7 (1M context) --- .gitea/workflows/test.yml | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/.gitea/workflows/test.yml b/.gitea/workflows/test.yml index 1903de8..872f18b 100644 --- a/.gitea/workflows/test.yml +++ b/.gitea/workflows/test.yml @@ -29,4 +29,11 @@ jobs: run: pnpm test:backend - name: Frontend tests (Vitest) + # Supabase's createClient validates the URL at module load, so the + # frontend tests need *some* value to import lib/supabase without + # throwing. Real auth calls are stubbed in the tests, so these are + # purely structural placeholders — never used over the wire. + env: + VITE_SUPABASE_URL: http://localhost:54321 + VITE_SUPABASE_ANON_KEY: placeholder-anon-key-for-tests-only run: pnpm test:frontend