CI / CD Pipeline
CI runs on every push/PR to main and dev. All jobs must pass before merging.
GitHub Actions Workflow
yaml
# .github/workflows/ci.yml
name: CI
on:
push:
branches: [main, dev]
pull_request:
branches: [main, dev]
jobs:
website:
name: Website (Next.js)
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: pnpm/action-setup@v2
with: { version: 8 }
- uses: actions/setup-node@v4
with: { node-version: 20, cache: pnpm }
- run: pnpm install --frozen-lockfile
- run: pnpm --filter @nester/website build
- run: pnpm --filter @nester/website lint
dapp-frontend:
name: Dapp Frontend (Next.js)
runs-on: ubuntu-latest
defaults:
run: { working-directory: apps/dapp/frontend }
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with: { node-version: 22 }
- run: npm install
- run: npm run build
dapp-backend:
name: Dapp Backend
runs-on: ubuntu-latest
defaults:
run: { working-directory: apps/dapp/backend }
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with: { node-version: 20 }
- run: npm ci
- run: npm run build
- run: npm run lint
intelligence:
name: Intelligence Service
runs-on: ubuntu-latest
defaults:
run: { working-directory: apps/intelligence }
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with: { node-version: 20 }
- run: npm ci
- run: npm run build
- run: npm run lintPre-Push Checklist
bash
# Run ALL of these from repo root before pushing:
# 1. Website
pnpm --filter @nester/website build && pnpm --filter @nester/website lint
# 2. Dapp Frontend
cd apps/dapp/frontend && npm run build && cd ../../..
# 3. Dapp Backend
cd apps/dapp/backend && npm run build && npm run lint && cd ../../..
# 4. Intelligence
cd apps/intelligence && npm run build && npm run lint && cd ../..Common CI Failures
| Failure | Fix |
|---|---|
npm ci sync error | Run npm install in affected directory, commit lock file |
pnpm --frozen-lockfile fails | Run pnpm install at root, commit lock file |
| Build error | Fix TypeScript/import errors locally |
| Lint error | Run lint command locally, fix violations |