Skip to content

CI Integration

domainlint uses exit codes to signal results, making it straightforward to integrate into any CI system.

.github/workflows/ci.yml
name: CI
on: [push, pull_request]
jobs:
lint-architecture:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 20
- run: npm ci
- name: Lint architecture
run: npx domainlint check

Run domainlint check as a build step. The process exits with code 1 when violations are found, which will fail the build.

Terminal window
# Any CI script
npx domainlint check
  • Run domainlint after npm ci / pnpm install so that tsconfig.json path resolution works correctly.
  • Use --no-color if your CI logs don’t support ANSI colors.
  • Use --feature=<name> to scope checks to a specific feature in large codebases.