ci: run tabularPagination.supabase.test.ts in the stack workflow
WHY THIS MATTERS
The whole point of this PR is to close a silent-skip gap: the Supabase
stack suites gate themselves on SUPABASE_TEST_* env vars and quietly
self-skip when those are absent, so plain CI never actually exercised
them. The new stack-tests workflow boots a real Supabase stack and runs
the suites with the env vars set - but its vitest invocation listed only
two of the three files that backend/scripts/test-stack.sh (the declared
source of truth) runs:
# test-stack.sh runs:
stack.supabase.test.ts
access.supabase.test.ts
tabularPagination.supabase.test.ts # <-- missing from CI
So tabularPagination.supabase.test.ts kept doing in CI exactly what
this PR exists to stop: skipping silently. Worse, the workflow comment
("The exact suite test-stack.sh invokes") claimed parity that did not
exist, which is how this kind of drift survives review.
WHAT IS A SELF-SKIPPING (GATED) SUITE
A gated suite decides at load time whether to run, based on the
environment it finds:
const url = process.env.SUPABASE_TEST_URL;
const serviceKey = process.env.SUPABASE_TEST_SERVICE_ROLE_KEY;
const maybeDescribe = url && serviceKey ? describe : describe.skip;
This is great for local ergonomics (checkout works without Docker), but
dangerous in CI: a skipped suite exits 0 and looks green. The only
defense is a workflow that provably sets the gate variables AND lists
every gated file - a list that must be kept in lockstep with the local
runner script, or files fall through the crack unnoticed.
HOW THE FIX WORKS
Add the missing file to the workflow's vitest invocation so the CI list
matches test-stack.sh file-for-file, making the "exact suite" comment
true. Nothing else needs enabling, verified on this branch:
- Gate variables: the suite gates only on SUPABASE_TEST_URL and
SUPABASE_TEST_SERVICE_ROLE_KEY, both already exported to the job env
by the "Export stack connection env" step.
- Schema: the suite touches only public.projects and
public.tabular_reviews, both created by backend/schema.sql, which the
"Load schema" step applies before tests run.
Verified: workflow YAML parses cleanly, and the exact three-file vitest
invocation loads all suites without error (they self-skip locally where
no stack is running, exit 0 - in CI the exported env vars flip them on).
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
| Repository | open-legal-products/mike |
|---|---|
| Author | Amal <mamalanand3@gmail.com> |
| Authored | |
| Committed | |
| Parents | 22542d8d |
| Stats | 1 file changed , +2 , -1 |
| Part of | Run Supabase security integration tests in CI |
Capture this commit into my fork
Download a Markdown prompt that tells Claude how to port this
exact commit into your working tree. Run it via
claude -p < capture-commit-78a0a40c.md
from inside the repo you want the change in.