Circle V2 API Docs
    Preparing search index...

    CI/CD

    The CI pipeline is defined in .github/workflows/ci.yml. It runs on every push to main and on every pull request.

    %%{init:{"theme":"dark"}}%% graph LR subgraph ci [CI Pipeline] Check["check<br/>Type check + Lint + Unit tests"] TestDB["test-db<br/>DB integration tests"] TestE2E["test-e2e<br/>Playwright E2E tests"] end

    Push["Push / PR"] --> Check Push --> TestDB Push --> TestE2E

    %%{init:{"theme":"default"}}%% graph LR subgraph ci [CI Pipeline] Check["check<br/>Type check + Lint + Unit tests"] TestDB["test-db<br/>DB integration tests"] TestE2E["test-e2e<br/>Playwright E2E tests"] end

    Push["Push / PR"] --> Check Push --> TestDB Push --> TestE2E

    graph LR
    subgraph ci [CI Pipeline]
    Check["check<br/>Type check + Lint + Unit tests"]
    TestDB["test-db<br/>DB integration tests"]
    TestE2E["test-e2e<br/>Playwright E2E tests"]
    end

    Push["Push / PR"] --> Check Push --> TestDB Push --> TestE2E

    All three jobs run in parallel for fast feedback.

    Purpose: Fast validation of types, linting, and unit tests (no external dependencies needed).

    Steps:

    1. Checkout code
    2. Install pnpm 10.23.0 + Node 20
    3. pnpm install --frozen-lockfile
    4. pnpm check-types -- TypeScript type checking across all packages
    5. pnpm lint -- Biome + ESLint
    6. pnpm turbo run test --filter=!@repo/db --filter=!@repo/e2e-web -- Unit tests (excluding DB and E2E packages)

    Purpose: Run database integration tests against a real Supabase instance.

    Steps:

    1. Checkout + install
    2. Install Supabase CLI
    3. pnpm --filter @repo/db test:supabase-start -- Start local Supabase via Docker
    4. pnpm --filter @repo/db test -- Run DB package tests

    Purpose: Run full end-to-end tests with Playwright.

    Steps:

    1. Checkout + install
    2. Install Supabase CLI
    3. Copy DB schema for E2E Supabase instance
    4. Start E2E Supabase
    5. Install Playwright Chromium browser
    6. Source packages/e2e-web/.env.test and run E2E tests with START_WEB_SERVER=true
    7. Upload Playwright report as artifact (retained 14 days)

    E2E test results are also reported to Currents when the CURRENTS_RECORD_KEY secret is available.

    Turborepo caches task outputs based on:

    • File inputs: Source files, test files, .env* files.
    • Environment variables: Declared per-task in turbo.json (e.g. SUPABASE_URL, DATABASE_URL).
    • Dependency outputs: Tasks declare dependsOn: ["^build"] so upstream changes invalidate downstream caches.

    This means:

    • Unchanged packages skip tests and builds entirely on re-runs.
    • Changing an env var invalidates the cache for affected tasks.
    • CI benefits from local Turbo caching (within a single run).
    %%{init:{"theme":"dark"}}%% graph TD Build["build"] -->|"dependsOn: ^build"| DepBuild["dependency builds"] Test["test"] -->|"dependsOn: ^build"| DepBuild Lint["lint"] -->|"dependsOn: ^lint"| DepLint["dependency lints"] CheckTypes["check-types"] -->|"dependsOn: ^check-types"| DepCheck["dependency checks"]
    %%{init:{"theme":"default"}}%% graph TD Build["build"] -->|"dependsOn: ^build"| DepBuild["dependency builds"] Test["test"] -->|"dependsOn: ^build"| DepBuild Lint["lint"] -->|"dependsOn: ^lint"| DepLint["dependency lints"] CheckTypes["check-types"] -->|"dependsOn: ^check-types"| DepCheck["dependency checks"]
    graph TD
      Build["build"] -->|"dependsOn: ^build"| DepBuild["dependency builds"]
      Test["test"] -->|"dependsOn: ^build"| DepBuild
      Lint["lint"] -->|"dependsOn: ^lint"| DepLint["dependency lints"]
      CheckTypes["check-types"] -->|"dependsOn: ^check-types"| DepCheck["dependency checks"]

    Deployment details for apps/web are environment-specific. The build output is standard Next.js (.next/).

    Key production settings from next.config.js:

    • assetPrefix: "/v2" -- assets served under /v2 for coexistence with the legacy app.
    • CORS headers allow LEGACY_APP_URL origin.

    Storybook (apps/storybook) deploys to Vercel. The vercel.json configures outputDirectory: "storybook-static".

    Build:

    pnpm --filter storybook storybook:build
    

    Back to Table of Contents