From 3693fd8f1bee85d51f188a822d765a7afac2be72 Mon Sep 17 00:00:00 2001 From: stefan binoj Date: Fri, 7 Nov 2025 11:52:13 +0530 Subject: [PATCH 1/2] optimized supabase start --- .github/common/supabase/action.yml | 25 +++++++++++++++++++++++++ .github/workflows/e2e.yml | 4 ++-- 2 files changed, 27 insertions(+), 2 deletions(-) create mode 100644 .github/common/supabase/action.yml diff --git a/.github/common/supabase/action.yml b/.github/common/supabase/action.yml new file mode 100644 index 000000000..2447da1cb --- /dev/null +++ b/.github/common/supabase/action.yml @@ -0,0 +1,25 @@ +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 + + - 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 + diff --git a/.github/workflows/e2e.yml b/.github/workflows/e2e.yml index 595d88e89..df7549a20 100644 --- a/.github/workflows/e2e.yml +++ b/.github/workflows/e2e.yml @@ -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 From bb635e23e096d341003385ebf504c7d83f93b7f2 Mon Sep 17 00:00:00 2001 From: stefan binoj Date: Fri, 7 Nov 2025 12:34:01 +0530 Subject: [PATCH 2/2] fixed formatting --- .github/common/supabase/action.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/common/supabase/action.yml b/.github/common/supabase/action.yml index 2447da1cb..33fb205ff 100644 --- a/.github/common/supabase/action.yml +++ b/.github/common/supabase/action.yml @@ -22,4 +22,3 @@ runs: shell: bash run: | pnpm run with-test-env pnpm tsx --conditions=react-server ./db/seeds/seedDatabase.ts -