ts-ddd-ci-designlisted
Install: claude install-skill Methasit-Pun/ts-ddd-clean-architecture
# CI/CD Pipeline Design — TypeScript DDD
Design pipelines that enforce quality gates, protect the dependency rule, and promote artifacts safely from development through to production.
## Pipeline philosophy
A good pipeline for a DDD project enforces:
1. **Type safety** — `tsc --noEmit` catches boundary violations at compile time
2. **Layer isolation** — import linting (e.g. `dependency-cruiser`) prevents domain from importing infrastructure
3. **Test pyramid** — unit tests run first (fast), integration tests run second, E2E last
4. **One artifact, many environments** — build Docker image once, promote the same image through envs
---
## GitHub Actions — recommended structure
```yaml
# .github/workflows/ci.yml
name: CI
on:
pull_request:
branches: [main, develop]
push:
branches: [main]
jobs:
quality:
name: Type Check + Lint
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: '20'
cache: 'npm'
- run: npm ci
- run: npm run typecheck # tsc --noEmit
- run: npm run lint # eslint
- run: npm run lint:deps # dependency-cruiser (layer boundary check)
test-unit:
name: Unit Tests
runs-on: ubuntu-latest
needs: quality
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: '20'
cache: 'npm'
- run: npm ci
- run