Skip to content

Node.js CI

Pipeline

name: node-ci
description: "Install deps, lint, test, and build a Node.js project"
steps:
- id: install
run: "npm ci"
- id: quality
run:
- "npm run lint"
- "npm run typecheck"
- "npm run test -- --coverage"
depends_on: "install"
- id: build
run: "npm run build"
depends_on: "install"
- id: bundle-size
run: "du -sh dist/ | cut -f1"
depends_on: "build"

Concepts demonstrated

  • Parallel commandsquality runs lint, typecheck, and test concurrently
  • Dependencies — both quality and build depend on install, but are independent of each other — they can run in parallel
  • Output passingbundle-size captures the dist folder size as $PIPE_BUNDLE_SIZE