fix(ci): add common-plat checkout for backend, upgrade Node to 22, add concurrency
- Backend: common-plat checkout + pnpm build so @bytelyst/* file: deps resolve - All jobs: Node 20→22, concurrency group for PR dedup
This commit is contained in:
parent
2f9cfbef6a
commit
fa1377892c
65
.github/workflows/ci.yml
vendored
65
.github/workflows/ci.yml
vendored
@ -6,31 +6,58 @@ on:
|
|||||||
pull_request:
|
pull_request:
|
||||||
branches: [main]
|
branches: [main]
|
||||||
|
|
||||||
|
concurrency:
|
||||||
|
group: ${{ github.workflow }}-${{ github.ref }}
|
||||||
|
cancel-in-progress: true
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
backend:
|
backend:
|
||||||
name: Backend
|
name: Backend — typecheck + test + build
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
defaults:
|
|
||||||
run:
|
|
||||||
working-directory: backend
|
|
||||||
env:
|
|
||||||
NODE_ENV: test
|
|
||||||
JWT_SECRET: ci-test-secret
|
|
||||||
DB_PROVIDER: memory
|
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v4
|
- 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
|
- uses: actions/setup-node@v4
|
||||||
with:
|
with:
|
||||||
node-version: 20
|
node-version: 22
|
||||||
cache: npm
|
|
||||||
cache-dependency-path: backend/package-lock.json
|
- name: Install pnpm (for common-plat build)
|
||||||
- run: npm ci
|
run: npm install -g pnpm
|
||||||
- run: npm run typecheck
|
|
||||||
- run: npm test
|
- name: Build @bytelyst/* packages
|
||||||
- run: npm run build
|
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
|
||||||
|
|
||||||
|
- name: Backend build
|
||||||
|
working-directory: backend
|
||||||
|
run: npm run build
|
||||||
|
|
||||||
web:
|
web:
|
||||||
name: Web
|
name: Web — typecheck + test + build
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
defaults:
|
defaults:
|
||||||
run:
|
run:
|
||||||
@ -39,7 +66,7 @@ jobs:
|
|||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@v4
|
||||||
- uses: actions/setup-node@v4
|
- uses: actions/setup-node@v4
|
||||||
with:
|
with:
|
||||||
node-version: 20
|
node-version: 22
|
||||||
cache: npm
|
cache: npm
|
||||||
cache-dependency-path: web/package-lock.json
|
cache-dependency-path: web/package-lock.json
|
||||||
- run: npm ci
|
- run: npm ci
|
||||||
@ -48,7 +75,7 @@ jobs:
|
|||||||
- run: npm run build
|
- run: npm run build
|
||||||
|
|
||||||
mobile:
|
mobile:
|
||||||
name: Mobile Typecheck
|
name: Mobile — typecheck
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
defaults:
|
defaults:
|
||||||
run:
|
run:
|
||||||
@ -57,7 +84,7 @@ jobs:
|
|||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@v4
|
||||||
- uses: actions/setup-node@v4
|
- uses: actions/setup-node@v4
|
||||||
with:
|
with:
|
||||||
node-version: 20
|
node-version: 22
|
||||||
cache: npm
|
cache: npm
|
||||||
cache-dependency-path: mobile/package-lock.json
|
cache-dependency-path: mobile/package-lock.json
|
||||||
- run: npm ci
|
- run: npm ci
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user