From 15f34c1c8008a8026ba03c4985447bc19454fd15 Mon Sep 17 00:00:00 2001 From: saravanakumardb1 Date: Fri, 20 Mar 2026 15:19:28 -0700 Subject: [PATCH] feat(ci): add backend CI job with common-plat checkout, upgrade Node to 22 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Backend: common-plat checkout, pnpm build, typecheck, 135 tests - Web: upgrade Node 20→22, add concurrency group --- .github/workflows/ci.yml | 53 +++++++++++++++++++++++++++++++++++++--- 1 file changed, 49 insertions(+), 4 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 72a2ef6..489f8ae 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -1,4 +1,4 @@ -name: CI — Lint, Typecheck, Test +name: CI on: push: @@ -6,19 +6,64 @@ on: pull_request: branches: [main] +concurrency: + group: ${{ github.workflow }}-${{ github.ref }} + cancel-in-progress: true + jobs: - ci: + 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 (for common-plat build) + run: npm install -g pnpm + + - name: Build @bytelyst/* packages + working-directory: learning_ai_common_plat + run: | + pnpm install --frozen-lockfile + pnpm build + + - name: Install backend dependencies + working-directory: backend + run: npm ci + + - name: Backend typecheck + working-directory: backend + run: npm run typecheck + + - name: Backend tests + working-directory: backend + run: npm 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 defaults: run: working-directory: web - steps: - uses: actions/checkout@v4 - uses: actions/setup-node@v4 with: - node-version: 20 + node-version: 22 cache: npm cache-dependency-path: web/package-lock.json