Skip to content

Add production readiness audit and infrastructure scaffolding #14

Add production readiness audit and infrastructure scaffolding

Add production readiness audit and infrastructure scaffolding #14

Workflow file for this run

name: CI
on:
push:
branches: [main]
pull_request:
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
lint:
name: Lint
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 22
cache: npm
- run: npm ci
- run: npm run lint
typecheck:
name: Type Check
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 22
cache: npm
- run: npm ci
- run: npx tsc --noEmit
test:
name: Test
needs: [lint, typecheck]
runs-on: ubuntu-latest
services:
mongo:
image: mongo:7
ports:
- 27017:27017
options: >-
--health-cmd "mongosh --eval 'db.runCommand({ping:1}).ok' --quiet"
--health-interval 10s
--health-timeout 5s
--health-retries 3
--health-start-period 10s
env:
MONGODB_URI: mongodb://localhost:27017/lms-test
JWT_SECRET: ci-test-secret-value-for-github-actions-minimum-length
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 22
cache: npm
- run: npm ci
- run: npm test
build:
name: Build
needs: [lint, typecheck]
runs-on: ubuntu-latest
env:
MONGODB_URI: mongodb://localhost:27017/lms
JWT_SECRET: ci-build-secret-value-for-github-actions-minimum-length
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 22
cache: npm
- run: npm ci
- run: npm run build