Repository navigation
refactor(dashboard): use theme status tokens instead of raw palette c… #3035
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: CI | |
| on: | |
| push: | |
| branches: [main, staging] | |
| paths-ignore: | |
| - "**.md" | |
| - "docs/**" | |
| - ".github/FUNDING.yml" | |
| pull_request: | |
| branches: [main, staging] | |
| permissions: | |
| contents: read | |
| concurrency: | |
| group: ci-${{ github.event_name == 'pull_request' && github.event.pull_request.head.repo.full_name || github.repository }}-${{ github.head_ref || github.ref_name }} | |
| cancel-in-progress: true | |
| jobs: | |
| lint: | |
| name: Lint | |
| runs-on: blacksmith-2vcpu-ubuntu-2404 | |
| timeout-minutes: 10 | |
| steps: | |
| - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7 | |
| with: | |
| fetch-depth: 0 | |
| - uses: oven-sh/setup-bun@0c5077e51419868618aeaa5fe8019c62421857d6 # v2 | |
| with: | |
| bun-version: "1.4.1" | |
| - uses: actions/cache@55cc8345863c7cc4c66a329aec7e433d2d1c52a9 # v6.1.0 | |
| with: | |
| path: ~/.bun/install/cache | |
| key: ${{ runner.os }}-bun-${{ hashFiles('bun.lock') }} | |
| restore-keys: ${{ runner.os }}-bun- | |
| - run: bun install --frozen-lockfile --ignore-scripts | |
| - run: bun run lint | |
| typecheck: | |
| name: Check Types | |
| runs-on: blacksmith-4vcpu-ubuntu-2404 | |
| timeout-minutes: 15 | |
| steps: | |
| - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7 | |
| - uses: oven-sh/setup-bun@0c5077e51419868618aeaa5fe8019c62421857d6 # v2 | |
| with: | |
| bun-version: "1.4.1" | |
| - uses: actions/cache@55cc8345863c7cc4c66a329aec7e433d2d1c52a9 # v6.1.0 | |
| with: | |
| path: ~/.bun/install/cache | |
| key: ${{ runner.os }}-bun-${{ hashFiles('bun.lock') }} | |
| restore-keys: ${{ runner.os }}-bun- | |
| - run: bun install --frozen-lockfile --ignore-scripts | |
| - run: bun run --cwd apps/docs postinstall | |
| - run: bun run --cwd apps/docs lint:links | |
| - run: bun run check-types | |
| env: | |
| TURBO_TOKEN: ${{ secrets.TURBO_TOKEN }} | |
| TURBO_TEAM: ${{ vars.TURBO_TEAM }} | |
| - name: ClickHouse types match DDL | |
| run: bun run --cwd packages/db ch:check | |
| - name: ClickHouse schema matches cluster | |
| env: | |
| CLICKHOUSE_READONLY_URL: ${{ secrets.CLICKHOUSE_READONLY_URL }} | |
| CLICKHOUSE_ACCESS_CLIENT_ID: ${{ secrets.CLICKHOUSE_ACCESS_CLIENT_ID }} | |
| CLICKHOUSE_ACCESS_CLIENT_SECRET: ${{ secrets.CLICKHOUSE_ACCESS_CLIENT_SECRET }} | |
| run: | | |
| if [[ -n "$CLICKHOUSE_READONLY_URL" ]]; then | |
| bun run --cwd packages/db ch:verify | |
| fi | |
| test: | |
| name: Test | |
| runs-on: blacksmith-4vcpu-ubuntu-2404 | |
| timeout-minutes: 15 | |
| env: | |
| TURBO_TOKEN: ${{ secrets.TURBO_TOKEN }} | |
| TURBO_TEAM: ${{ vars.TURBO_TEAM }} | |
| DATABASE_URL: postgresql://postgres:postgres@localhost:5432/databuddy_test | |
| REDIS_URL: redis://localhost:6379 | |
| BETTER_AUTH_SECRET: test-auth-secret-for-ci-testing-only | |
| BETTER_AUTH_URL: http://localhost:3000 | |
| GITHUB_CLIENT_ID: test-github-client-id | |
| GITHUB_CLIENT_SECRET: test-github-client-secret | |
| GOOGLE_CLIENT_ID: test-google-client-id | |
| GOOGLE_CLIENT_SECRET: test-google-client-secret | |
| RESEND_API_KEY: test-resend-api-key | |
| AUTUMN_SECRET_KEY: test-autumn-secret-key | |
| NEXT_PUBLIC_API_URL: http://localhost:3000/api | |
| IP_HASH_SALT: test-ip-hash-salt | |
| services: | |
| redis: | |
| image: redis:7-alpine | |
| ports: | |
| - 6379:6379 | |
| options: >- | |
| --health-cmd "redis-cli ping" | |
| --health-interval 10s | |
| --health-timeout 5s | |
| --health-retries 5 | |
| postgres: | |
| image: postgres:17-alpine | |
| env: | |
| POSTGRES_USER: postgres | |
| POSTGRES_PASSWORD: postgres | |
| POSTGRES_DB: databuddy_test | |
| ports: | |
| - 5432:5432 | |
| options: >- | |
| --health-cmd "pg_isready -U postgres" | |
| --health-interval 10s | |
| --health-timeout 5s | |
| --health-retries 5 | |
| clickhouse: | |
| image: clickhouse/clickhouse-server:25.5.1-alpine | |
| env: | |
| CLICKHOUSE_DB: databuddy_analytics | |
| CLICKHOUSE_USER: default | |
| CLICKHOUSE_DEFAULT_ACCESS_MANAGEMENT: 1 | |
| ports: | |
| - 8123:8123 | |
| options: >- | |
| --ulimit nofile=262144:262144 | |
| --health-cmd "clickhouse-client --query 'SELECT 1'" | |
| --health-interval 10s | |
| --health-timeout 5s | |
| --health-start-period 30s | |
| --health-retries 12 | |
| steps: | |
| - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7 | |
| with: | |
| fetch-depth: 2 | |
| - uses: oven-sh/setup-bun@0c5077e51419868618aeaa5fe8019c62421857d6 # v2 | |
| with: | |
| bun-version: "1.4.1" | |
| - uses: actions/cache@55cc8345863c7cc4c66a329aec7e433d2d1c52a9 # v6.1.0 | |
| with: | |
| path: ~/.bun/install/cache | |
| key: ${{ runner.os }}-bun-${{ hashFiles('bun.lock') }} | |
| restore-keys: ${{ runner.os }}-bun- | |
| - uses: actions/cache@55cc8345863c7cc4c66a329aec7e433d2d1c52a9 # v6.1.0 | |
| with: | |
| path: .turbo | |
| key: ${{ runner.os }}-turbo-${{ github.sha }} | |
| restore-keys: ${{ runner.os }}-turbo- | |
| - run: bun install --frozen-lockfile --ignore-scripts | |
| - name: Push test schema | |
| run: cd packages/db && bunx drizzle-kit push | |
| - name: Init ClickHouse schema | |
| env: | |
| CLICKHOUSE_URL: http://default:@localhost:8123 | |
| run: bun run --cwd packages/db clickhouse:init | |
| - name: Test | |
| env: | |
| CLICKHOUSE_INTEGRATION_TESTS: "true" | |
| WEBSITE_READER_INTEGRATION_TESTS: "true" | |
| CLICKHOUSE_URL: http://default:@localhost:8123 | |
| NODE_ENV: test | |
| run: bun run test | |
| - name: Self-hosted dashboard settings | |
| if: ${{ !cancelled() }} | |
| run: >- | |
| bun test --no-env-file apps/dashboard/next-config.test.ts | |
| apps/dashboard/app/layout.test.ts | |
| apps/dashboard/lib/app-url.test.ts | |
| 'apps/dashboard/app/(main)/websites/[id]/_components/utils/code-generators.test.ts' | |
| 'apps/dashboard/app/(main)/onboarding/_components/step-install-tracking.test.ts' | |
| - name: Self-hosted billing UI | |
| if: ${{ !cancelled() }} | |
| run: bun test --no-env-file --isolate apps/dashboard/components/providers/selfhost-billing.test.tsx | |
| - name: Integration | |
| if: ${{ !cancelled() }} | |
| env: | |
| NODE_ENV: test | |
| CLICKHOUSE_URL: http://default:@localhost:8123 | |
| run: bun run test:integration |