Wires bash scripts/gitea/doctor.sh --quiet as a pre-build step in all 4 jobs (backend, web, mobile, e2e). Catches the F15 class of failures — stale env tokens, registry unreachable, owner-rename drift — in ~2s instead of waiting for pnpm install to fail mid-build. continue-on-error: true for now so warnings don't block the pipeline during rollout. Flip to required once the doctor pattern is established ecosystem-wide. Pattern documented in: learning_ai_devops_tools/docs/docker-build-optimization-roadmap.md § E0
118 lines
3.2 KiB
YAML
118 lines
3.2 KiB
YAML
name: CI — NoteLett
|
|
|
|
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
|
|
|
|
jobs:
|
|
backend:
|
|
name: Backend — typecheck + test + build
|
|
runs-on: ubuntu-latest
|
|
defaults:
|
|
run:
|
|
working-directory: /Users/sd9235/code/mygh/learning_ai_notes
|
|
steps:
|
|
- name: Pull latest
|
|
run: git pull --ff-only origin main || true
|
|
|
|
- name: Gitea registry pre-flight (F15 guard)
|
|
run: bash ../learning_ai_common_plat/scripts/gitea/doctor.sh --quiet
|
|
continue-on-error: true
|
|
|
|
- name: Install workspace dependencies
|
|
run: HUSKY=0 pnpm install --frozen-lockfile
|
|
|
|
- name: Backend lint
|
|
run: pnpm --filter @notelett/backend run lint
|
|
|
|
- name: Backend typecheck
|
|
run: pnpm --filter @notelett/backend run typecheck
|
|
|
|
- name: Backend tests
|
|
run: pnpm --filter @notelett/backend run test
|
|
|
|
- name: Backend build
|
|
run: pnpm --filter @notelett/backend run build
|
|
|
|
web:
|
|
name: Web — typecheck + test + build
|
|
runs-on: ubuntu-latest
|
|
defaults:
|
|
run:
|
|
working-directory: /Users/sd9235/code/mygh/learning_ai_notes
|
|
steps:
|
|
- name: Pull latest
|
|
run: git pull --ff-only origin main || true
|
|
|
|
- name: Gitea registry pre-flight (F15 guard)
|
|
run: bash ../learning_ai_common_plat/scripts/gitea/doctor.sh --quiet
|
|
continue-on-error: true
|
|
|
|
- name: Install workspace dependencies
|
|
run: HUSKY=0 pnpm install --frozen-lockfile
|
|
|
|
- name: Web lint
|
|
run: pnpm --filter @notelett/web run lint
|
|
|
|
- name: Web typecheck
|
|
run: pnpm --filter @notelett/web run typecheck
|
|
|
|
- name: Web tests
|
|
run: pnpm --filter @notelett/web run test
|
|
|
|
- name: Web build
|
|
run: pnpm --filter @notelett/web run build
|
|
|
|
mobile:
|
|
name: Mobile — typecheck
|
|
runs-on: ubuntu-latest
|
|
defaults:
|
|
run:
|
|
working-directory: /Users/sd9235/code/mygh/learning_ai_notes
|
|
steps:
|
|
- name: Pull latest
|
|
run: git pull --ff-only origin main || true
|
|
|
|
- name: Gitea registry pre-flight (F15 guard)
|
|
run: bash ../learning_ai_common_plat/scripts/gitea/doctor.sh --quiet
|
|
continue-on-error: true
|
|
|
|
- name: Install workspace dependencies
|
|
run: HUSKY=0 pnpm install --frozen-lockfile
|
|
|
|
- name: Mobile typecheck
|
|
run: pnpm --filter @notelett/mobile run typecheck
|
|
|
|
e2e:
|
|
name: E2E — Playwright
|
|
runs-on: ubuntu-latest
|
|
defaults:
|
|
run:
|
|
working-directory: /Users/sd9235/code/mygh/learning_ai_notes
|
|
steps:
|
|
- name: Pull latest
|
|
run: git pull --ff-only origin main || true
|
|
|
|
- name: Gitea registry pre-flight (F15 guard)
|
|
run: bash ../learning_ai_common_plat/scripts/gitea/doctor.sh --quiet
|
|
continue-on-error: true
|
|
|
|
- name: Install workspace dependencies
|
|
run: HUSKY=0 pnpm install --frozen-lockfile
|
|
|
|
- name: Install Playwright browsers
|
|
run: pnpm --filter @notelett/web exec playwright install --with-deps chromium
|
|
|
|
- name: Run E2E tests
|
|
run: pnpm --filter @notelett/web run test:e2e
|
|
continue-on-error: true
|
|
|