- Add pnpm-workspace.yaml (backend + web + common-plat packages) - Add root package.json with workspace scripts and pnpm config - Add packageManager: pnpm@10.6.5 to backend/web manifests - Remove package-lock.json files, generate pnpm-lock.yaml - Add root .gitignore (was missing) - Update CI to use pnpm workspace commands - Add transpilePackages + webpack symlinks to next.config.ts - Update docker-prep.sh for backend + web consumers - Rewrite backend/web Dockerfiles to .docker-deps consumer pattern - Add .dockerignore Verified: typecheck + 576 tests (182 backend + 394 web) + builds pass Docker: backend + web smoke builds pass
94 lines
2.3 KiB
YAML
94 lines
2.3 KiB
YAML
name: CI
|
|
|
|
on:
|
|
push:
|
|
branches: [main]
|
|
pull_request:
|
|
branches: [main]
|
|
|
|
concurrency:
|
|
group: ${{ github.workflow }}-${{ github.ref }}
|
|
cancel-in-progress: true
|
|
|
|
jobs:
|
|
backend:
|
|
name: Backend — typecheck + test
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
|
|
- name: Checkout common-plat (for @bytelyst/* packages)
|
|
uses: actions/checkout@v4
|
|
with:
|
|
repository: saravanakumardb1/learning_ai_common_plat
|
|
path: learning_ai_common_plat
|
|
token: ${{ secrets.GH_PAT }}
|
|
|
|
- uses: actions/setup-node@v4
|
|
with:
|
|
node-version: 22
|
|
|
|
- name: Install pnpm
|
|
run: npm install -g pnpm@10.6.5
|
|
|
|
- name: Build @bytelyst/* packages
|
|
working-directory: learning_ai_common_plat
|
|
run: |
|
|
pnpm install --frozen-lockfile
|
|
pnpm build
|
|
|
|
- name: Install workspace dependencies
|
|
run: pnpm install
|
|
|
|
- name: Backend typecheck
|
|
run: pnpm --filter @chronomind/backend run typecheck
|
|
|
|
- name: Backend tests
|
|
run: pnpm --filter @chronomind/backend run test
|
|
env:
|
|
DB_PROVIDER: memory
|
|
JWT_SECRET: ci-test-secret-at-least-32-characters-long
|
|
|
|
web:
|
|
name: Web — typecheck + lint + test
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
|
|
- name: Checkout common-plat (for @bytelyst/* packages)
|
|
uses: actions/checkout@v4
|
|
with:
|
|
repository: saravanakumardb1/learning_ai_common_plat
|
|
path: learning_ai_common_plat
|
|
token: ${{ secrets.GH_PAT }}
|
|
|
|
- uses: actions/setup-node@v4
|
|
with:
|
|
node-version: 22
|
|
|
|
- name: Install pnpm
|
|
run: npm install -g pnpm@10.6.5
|
|
|
|
- name: Build @bytelyst/* packages
|
|
working-directory: learning_ai_common_plat
|
|
run: |
|
|
pnpm install --frozen-lockfile
|
|
pnpm build
|
|
|
|
- name: Install workspace dependencies
|
|
run: 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
|
|
env:
|
|
NEXT_TELEMETRY_DISABLED: '1'
|