Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 24 additions & 0 deletions .github/common/supabase/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
name: Setup Supabase and Seed Database

runs:
using: "composite"
steps:
- name: Install Supabase CLI
uses: supabase/setup-cli@v1
with:
version: "latest"

- name: Start Supabase Services
shell: bash
run: |
pnpm run with-test-env pnpm supabase start -x=realtime,logflare,postgres-meta,mailpit,edge-runtime,studio,vector

Copy link
Contributor Author

@stefanbinoj stefanbinoj Nov 7, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  • The -x= flag is used to exclude unnecessary Supabase images that increase pull time.
  • The following list explains which Supabase images are required and which are not:

✅ Required Images

  • postgres – Database storing all application data (conversations, users, messages, settings)
  • storage-api – File storage for image attachments in e2e tests
  • gotrue – Authentication service for user login in auth.setup.ts
  • postgrest – REST API layer used by the app to communicate with the database
  • kong – API gateway that routes requests between services

❌ Not Required (excluded in CI)

  • realtime – Real-time subscriptions for conversation updates (not needed for e2e tests)
  • logflare – Logging and analytics service not used in tests
  • vector – Vector database for embeddings (not invoked in the e2e test suite)
  • mailpit – Email testing server (e2e tests don't verify emails)
  • postgres-meta – Database metadata admin utility not needed for tests
  • edge-runtime – Edge functions service (no edge functions in this project)
  • studio – Supabase UI dashboard (not required for headless tests)

NOTE : realtime image is pulled even after excluding it as in the video, My guess is that realtime is a dependency of kong or postgrest image.

- name: Run Database Migrations
shell: bash
run: |
pnpm run with-test-env drizzle-kit migrate --config ./db/drizzle.config.ts

- name: Seed Database
shell: bash
run: |
pnpm run with-test-env pnpm tsx --conditions=react-server ./db/seeds/seedDatabase.ts
4 changes: 2 additions & 2 deletions .github/workflows/e2e.yml
Original file line number Diff line number Diff line change
Expand Up @@ -71,8 +71,8 @@ jobs:
run: pnpm playwright install --with-deps chromium
if: steps.playwright-cache.outputs.cache-hit != 'true'

- name: Setup E2E test environment
run: ./scripts/setup-e2e-tests.sh
- name: Setup Supabase and Seed
uses: ./.github/common/supabase

- name: Build next
run: pnpm with-test-env next build
Expand Down