- backend/Dockerfile: multi-stage Node.js build (install → build → runtime) - web/Dockerfile: multi-stage Next.js standalone build - docker-compose.yml: backend (4016) + web (3000) with health check - scripts/docker-prep.sh: pack @bytelyst/* tarballs + rewrite file: refs (--restore to undo) - .github/workflows/ci.yml: backend (typecheck+test+build), web (typecheck+test+build), mobile (typecheck)
65 lines
1.3 KiB
YAML
65 lines
1.3 KiB
YAML
name: CI
|
|
|
|
on:
|
|
push:
|
|
branches: [main]
|
|
pull_request:
|
|
branches: [main]
|
|
|
|
jobs:
|
|
backend:
|
|
name: Backend
|
|
runs-on: ubuntu-latest
|
|
defaults:
|
|
run:
|
|
working-directory: backend
|
|
env:
|
|
NODE_ENV: test
|
|
JWT_SECRET: ci-test-secret
|
|
DB_PROVIDER: memory
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
- uses: actions/setup-node@v4
|
|
with:
|
|
node-version: 20
|
|
cache: npm
|
|
cache-dependency-path: backend/package-lock.json
|
|
- run: npm ci
|
|
- run: npm run typecheck
|
|
- run: npm test
|
|
- run: npm run build
|
|
|
|
web:
|
|
name: Web
|
|
runs-on: ubuntu-latest
|
|
defaults:
|
|
run:
|
|
working-directory: web
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
- uses: actions/setup-node@v4
|
|
with:
|
|
node-version: 20
|
|
cache: npm
|
|
cache-dependency-path: web/package-lock.json
|
|
- run: npm ci
|
|
- run: npm run typecheck
|
|
- run: npm test
|
|
- run: npm run build
|
|
|
|
mobile:
|
|
name: Mobile Typecheck
|
|
runs-on: ubuntu-latest
|
|
defaults:
|
|
run:
|
|
working-directory: mobile
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
- uses: actions/setup-node@v4
|
|
with:
|
|
node-version: 20
|
|
cache: npm
|
|
cache-dependency-path: mobile/package-lock.json
|
|
- run: npm ci
|
|
- run: npm run typecheck
|