87 lines
2.1 KiB
YAML
87 lines
2.1 KiB
YAML
name: CI — ChronoMind
|
|
|
|
on:
|
|
push:
|
|
branches: [main]
|
|
|
|
concurrency:
|
|
group: ${{ github.workflow }}-${{ github.ref }}
|
|
cancel-in-progress: true
|
|
|
|
env:
|
|
DB_PROVIDER: memory
|
|
JWT_SECRET: ci-test-secret-at-least-32-characters-long
|
|
NEXT_TELEMETRY_DISABLED: '1'
|
|
|
|
jobs:
|
|
backend:
|
|
name: Backend — typecheck + test
|
|
runs-on: ubuntu-latest
|
|
defaults:
|
|
run:
|
|
working-directory: /Users/sd9235/code/mygh/learning_ai_clock
|
|
steps:
|
|
- name: Pull latest
|
|
run: git pull --ff-only origin main || true
|
|
|
|
- name: Install workspace dependencies
|
|
run: HUSKY=0 pnpm install
|
|
|
|
- name: Backend lint
|
|
run: pnpm --filter @chronomind/backend run lint
|
|
|
|
- name: Backend typecheck
|
|
run: pnpm --filter @chronomind/backend run typecheck
|
|
|
|
- name: Backend tests
|
|
run: pnpm --filter @chronomind/backend run test
|
|
|
|
- name: Backend build
|
|
run: pnpm --filter @chronomind/backend run build
|
|
|
|
web:
|
|
name: Web — typecheck + lint + test + build
|
|
runs-on: ubuntu-latest
|
|
defaults:
|
|
run:
|
|
working-directory: /Users/sd9235/code/mygh/learning_ai_clock
|
|
steps:
|
|
- name: Pull latest
|
|
run: git pull --ff-only origin main || true
|
|
|
|
- name: Install workspace dependencies
|
|
run: HUSKY=0 pnpm install
|
|
|
|
- name: Web typecheck
|
|
run: pnpm --filter web run typecheck
|
|
|
|
- name: Web lint
|
|
run: pnpm --filter web run lint
|
|
|
|
- name: Web test
|
|
run: pnpm --filter web run test
|
|
|
|
- name: Web build
|
|
run: pnpm --filter web run build
|
|
|
|
e2e:
|
|
name: E2E — Playwright
|
|
runs-on: ubuntu-latest
|
|
defaults:
|
|
run:
|
|
working-directory: /Users/sd9235/code/mygh/learning_ai_clock
|
|
steps:
|
|
- name: Pull latest
|
|
run: git pull --ff-only origin main || true
|
|
|
|
- name: Install workspace dependencies
|
|
run: HUSKY=0 pnpm install --frozen-lockfile
|
|
|
|
- name: Install Playwright browsers
|
|
run: pnpm --filter web exec playwright install --with-deps chromium
|
|
|
|
- name: Run E2E tests
|
|
run: pnpm --filter web run test:e2e
|
|
continue-on-error: true
|
|
|