-
Notifications
You must be signed in to change notification settings - Fork 4
CI Pipelines
CI (Continuous Integration) pipelines automatically verify the health of a project each time code is pushed or a pull request is opened.
In our practicum, CI pipelines run code quality checks, compile source code, and run automated tests before changes can be merged.
This page explains how CI pipelines work in our organization, and how they may differ across repos.
View CI Pipeline Overview
A CI pipeline ensures that changes do not break the project by:
- Linting (ESLint/Prettier)
- Type-checking
- Static analysis
- TypeScript builds
- App builds (Next.js/NestJS)
- Unit tests
- Coverage reports
- Compiled builds
- Coverage HTML reports
CI ensures every student, across every quarter, pushes working code, not just code that βworks on their machine.β
View Org-Wide CI Expectations
The practicum uses GitHub Actions for all CI workflows.
- π‘ Pull requests β before code is reviewed or merged
- π Push to
mainor release branches - π§ͺ Optionally nightly or scheduled builds
| Tool | Purpose |
|---|---|
| ESLint | Find code errors / enforces standards |
| Prettier | Auto-formatting |
| TypeScript | Catch type errors & invalid code |
| Jest | Run frontend/backend tests |
| Coverage Scripts | Validate test quality |
| Cache Actions | Speed up installs |
CI pipelines must succeed before code can be deployed.
(Deployment guidelines are in the CD page.)
Not all repos fully implement this yet β standards exist so students build toward it.
View Example: NSC Events CI
The NSC Events repository contains two separate apps:
-
nsc-events-nextjsβ Frontend (Next.js) -
nsc-events-nestjsβ Backend (NestJS)
This repo uses multiple CI workflows:
| Workflow | Runs On | Responsibility |
|---|---|---|
backend-ci.yml |
push to main
|
Lint, compile, test backend |
frontend-ci.yml |
push to main
|
Lint, compile, test frontend |
on-pull-request.yml |
PR checks | Runs backend or frontend checks selectively |
File excerpt (paths-filter triggering):
- uses: dorny/paths-filter@v2
id: filter
with:
filters: |
frontend:
- 'nsc-events-nextjs/**'
backend:
- 'nsc-events-nestjs/**'If a PR modifies only the frontend, only frontend tests run.
This speeds up CI significantly on large monorepos.
Husky is NOT a standard across the org right now
It exists only in NSC Events to enforce CI rules locally.
Other projects do not currently include local CI simulation.
View Generic CI Template
Any practicum repo can structure CI like this:
name: CI Pipeline
on:
pull_request:
push:
branches: [ main, develop ]
jobs:
validate:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
# 1) Install dependencies
- uses: actions/setup-node@v4
with:
node-version: 20
- run: npm ci
# 2) Lint and Type Check
- run: npm run lint
- run: npm run compile
# 3) Run Tests (Optional per repo)
- run: npm run test --if-present
# 4) Build App
- run: npm run build --if-presentAny new project can:
- Add coverage requirements
- Archive test reports
- Add deploy steps when ready
View Repository Comparison
- Monorepo with selective CI
- Separate frontend & backend jobs
- Coverage artifacts stored
- Husky for local CI simulation
- Run tests + lint on PR
- Build on push to
main
- Only lint + build checks
- No CI yet β encourage using the template
- These should eventually adopt lint + test + build pipelines
Standardize all repos over time to a minimum CI requirement.
Home β’ New Student Onboarding β’ Guides β’ Projects β’ Code of Conduct β’ FAQ
Last updated: 12/7/2025