Remove obsolete Docker/Buildkite infra, update to Supabase-based local dev #4
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Tests | |
| on: | |
| push: | |
| branches: [main] | |
| pull_request: | |
| branches: [main] | |
| jobs: | |
| test: | |
| runs-on: ubuntu-latest | |
| permissions: | |
| contents: read | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v4 | |
| - name: Setup Bun | |
| uses: oven-sh/setup-bun@v2 | |
| - name: Install dependencies | |
| run: bun install | |
| - name: Setup Supabase CLI | |
| uses: supabase/setup-cli@v1 | |
| with: | |
| version: latest | |
| - name: Start Supabase | |
| run: supabase start | |
| - name: Set Supabase env vars | |
| run: | | |
| supabase status -o env > /tmp/supabase_env | |
| source /tmp/supabase_env | |
| echo "NEXT_PUBLIC_SUPABASE_PUBLISHABLE_KEY=$ANON_KEY" >> $GITHUB_ENV | |
| echo "SUPABASE_SECRET_KEY=$SERVICE_ROLE_KEY" >> $GITHUB_ENV | |
| - name: Typecheck and lint | |
| run: bun check | |
| - name: Start dev server | |
| run: | | |
| dotenv -e .env.test -- bun next dev & | |
| # Wait for the server to be ready | |
| for i in $(seq 1 30); do | |
| if curl -s http://localhost:3000 > /dev/null 2>&1; then | |
| echo "Server is ready" | |
| break | |
| fi | |
| echo "Waiting for server to start... ($i/30)" | |
| sleep 2 | |
| done | |
| - name: Run tests | |
| run: bun test | |
| - name: Stop Supabase | |
| if: always() | |
| run: supabase stop |