Skip to content

Queue Invites for Draft Processes #1432

Queue Invites for Draft Processes

Queue Invites for Draft Processes #1432

Workflow file for this run

name: Tests
on:
pull_request:
jobs:
test:
name: Tests
runs-on: ubuntu-latest
env:
# Tiptap Pro registry authentication
TIPTAP_PRO_TOKEN: ${{ secrets.TIPTAP_PRO_TOKEN }}
# Supabase test instance environment variables (using local dev keys)
NEXT_PUBLIC_SUPABASE_URL: http://127.0.0.1:55321
NEXT_PUBLIC_SUPABASE_ANON_KEY: eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJzdXBhYmFzZS1kZW1vIiwicm9sZSI6ImFub24iLCJleHAiOjE5ODM4MTI5OTZ9.CRXP1A7WOeoJeXxjNni43kdQwgnWNReilDMblYTn_I0
SUPABASE_URL: http://127.0.0.1:55321
SUPABASE_ANON_KEY: eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJzdXBhYmFzZS1kZW1vIiwicm9sZSI6InNlcnZpY2Vfcm9sZSIsImV4cCI6MTk4MzgxMjk5Nn0.EGIM96RAZx35lJzdJsyH-qQwv8Hdp7fsn3W0YpN81IU
SUPABASE_SERVICE_ROLE: eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJzdXBhYmFzZS1kZW1vIiwicm9sZSI6InNlcnZpY2Vfcm9sZSIsImV4cCI6MTk4MzgxMjk5Nn0.EGIM96RAZx35lJzdJsyH-qQwv8Hdp7fsn3W0YpN81IU
DATABASE_URL: postgresql://postgres:postgres@127.0.0.1:55322/postgres
NEXT_PUBLIC_POSTHOG_KEY: test_posthog_key
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version-file: '.nvmrc'
- name: Enable Corepack
run: corepack enable
- name: Install pnpm
run: corepack prepare pnpm@latest --activate
- name: Get pnpm store directory
id: pnpm-cache
shell: bash
run: |
echo "STORE_PATH=$(pnpm store path)" >> $GITHUB_OUTPUT
- name: Setup pnpm cache
uses: actions/cache@v4
with:
path: ${{ steps.pnpm-cache.outputs.STORE_PATH }}
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}
restore-keys: |
${{ runner.os }}-pnpm-store-
- name: Install dependencies
run: pnpm install --frozen-lockfile
- name: Setup Supabase CLI
uses: supabase/setup-cli@v1
with:
version: 2.71.0 # Pinned: v2.71.1+ breaks auth.admin.deleteUser() in test cleanup
- name: Use CI config
run: cp supabase/supabase-ci.toml supabase/config.toml
- name: Start Supabase
run: |
echo "Starting Supabase with CI config..."
supabase start
echo "Supabase started successfully"
- name: Check Supabase status
run: supabase status
- name: Wait for Supabase to be ready and run migrations
run: pnpm w:db migrate:test
- name: Run tests
run: pnpm test