Skip to content

redesign: modernize landing page with clean SaaS aesthetic #6

redesign: modernize landing page with clean SaaS aesthetic

redesign: modernize landing page with clean SaaS aesthetic #6

Workflow file for this run

name: CI
on:
push:
branches: [main, develop]
pull_request:
branches: [main, develop]
env:
# Playwright needs a display on Linux
DISPLAY: :99
jobs:
# ─────────────────────────────────────────────────────────────
# 1. Lint & type-check
# ─────────────────────────────────────────────────────────────
quality:
name: Lint & type-check
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: pnpm/action-setup@v4
- uses: actions/setup-node@v4
with:
node-version: 20
cache: pnpm
- name: Install dependencies
run: pnpm install --frozen-lockfile
- name: Lint
run: pnpm lint
- name: Type-check
run: pnpm type-check
# ─────────────────────────────────────────────────────────────
# 2. Unit tests (Vitest)
# ─────────────────────────────────────────────────────────────
unit-tests:
name: Unit tests
runs-on: ubuntu-latest
needs: quality
steps:
- uses: actions/checkout@v4
- uses: pnpm/action-setup@v4
- uses: actions/setup-node@v4
with:
node-version: 20
cache: pnpm
- name: Install dependencies
run: pnpm install --frozen-lockfile
- name: Run unit tests with coverage
run: pnpm test -- --coverage
- name: Upload coverage
uses: actions/upload-artifact@v4
if: always()
with:
name: unit-coverage
path: |
packages/ui/coverage/
packages/api-client/coverage/
apps/web/coverage/
# ─────────────────────────────────────────────────────────────
# 3. Build (required before E2E)
# ─────────────────────────────────────────────────────────────
build:
name: Build web
runs-on: ubuntu-latest
needs: unit-tests
env:
# CI needs at minimum these stub values to compile without DB calls
BETTER_AUTH_SECRET: ci-secret-placeholder
BETTER_AUTH_URL: http://localhost:3000
NEXT_PUBLIC_APP_URL: http://localhost:3000
DATABASE_URL: postgresql://user:pass@localhost/ci_db
GROQ_API_KEY: gsk_ci_placeholder
AI_PROVIDER: groq
AI_MODEL: llama-3.3-70b-versatile
steps:
- uses: actions/checkout@v4
- uses: pnpm/action-setup@v4
- uses: actions/setup-node@v4
with:
node-version: 20
cache: pnpm
- name: Install dependencies
run: pnpm install --frozen-lockfile
- name: Build web app
run: pnpm build:web
- name: Cache Next.js build
uses: actions/cache@v4
with:
path: apps/web/.next
key: nextjs-build-${{ github.sha }}
# ─────────────────────────────────────────────────────────────
# 4. E2E tests (Playwright)
# ─────────────────────────────────────────────────────────────
e2e:
name: E2E tests (Playwright)
runs-on: ubuntu-latest
needs: build
env:
BETTER_AUTH_SECRET: ci-secret-placeholder
BETTER_AUTH_URL: http://localhost:3000
NEXT_PUBLIC_APP_URL: http://localhost:3000
DATABASE_URL: postgresql://user:pass@localhost/ci_db
GROQ_API_KEY: gsk_ci_placeholder
AI_PROVIDER: groq
AI_MODEL: llama-3.3-70b-versatile
PLAYWRIGHT_BASE_URL: http://localhost:3000
steps:
- uses: actions/checkout@v4
- uses: pnpm/action-setup@v4
- uses: actions/setup-node@v4
with:
node-version: 20
cache: pnpm
- name: Install dependencies
run: pnpm install --frozen-lockfile
- name: Restore Next.js build cache
uses: actions/cache@v4
with:
path: apps/web/.next
key: nextjs-build-${{ github.sha }}
- name: Install Playwright browsers
run: pnpm --filter=@template/web exec playwright install --with-deps chromium
- name: Run E2E tests
run: pnpm test:e2e
- name: Upload Playwright report
uses: actions/upload-artifact@v4
if: always()
with:
name: playwright-report
path: apps/web/playwright-report/
retention-days: 14