Skip to content

fix: update e2e tests to match current landing page UI #19

fix: update e2e tests to match current landing page UI

fix: update e2e tests to match current landing page UI #19

Workflow file for this run

name: CI
on:
push:
branches: [main]
pull_request:
branches: [main]
jobs:
build-and-lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 20
cache: npm
- run: npm ci
- run: npx next build
env:
NEXT_PUBLIC_SUPABASE_URL: ${{ secrets.NEXT_PUBLIC_SUPABASE_URL }}
NEXT_PUBLIC_SUPABASE_ANON_KEY: ${{ secrets.NEXT_PUBLIC_SUPABASE_ANON_KEY }}
- run: npm run lint
unit:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 20
cache: npm
- run: npm ci
- run: npx vitest run
e2e:
runs-on: ubuntu-latest
needs: build-and-lint
env:
# Supabase public vars are needed at build time and for the running server.
# These are safe to expose as NEXT_PUBLIC_* — they are the anon (read-only) key.
NEXT_PUBLIC_SUPABASE_URL: ${{ secrets.NEXT_PUBLIC_SUPABASE_URL }}
NEXT_PUBLIC_SUPABASE_ANON_KEY: ${{ secrets.NEXT_PUBLIC_SUPABASE_ANON_KEY }}
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 20
cache: npm
- run: npm ci
# Build the production bundle in this job so we can serve it with
# `next start` instead of `next dev`. The dev compiler is unreliable
# in CI (cold start can exceed the webServer timeout) and makes tests
# non-deterministic. The production server starts in ~2 s.
- name: Build
run: npx next build
env:
NEXT_PUBLIC_SUPABASE_URL: ${{ secrets.NEXT_PUBLIC_SUPABASE_URL }}
NEXT_PUBLIC_SUPABASE_ANON_KEY: ${{ secrets.NEXT_PUBLIC_SUPABASE_ANON_KEY }}
- name: Install Playwright browsers
run: npx playwright install --with-deps chromium
- name: Run e2e tests
run: npm run test:e2e