CI Integration
domainlint uses exit codes to signal results, making it straightforward to integrate into any CI system.
GitHub Actions
Section titled “GitHub Actions”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 checkOther CI systems
Section titled “Other CI systems”Run domainlint check as a build step. The process exits with code 1 when violations are found, which will fail the build.
# Any CI scriptnpx domainlint check- Run domainlint after
npm ci/pnpm installso thattsconfig.jsonpath resolution works correctly. - Use
--no-colorif your CI logs don’t support ANSI colors. - Use
--feature=<name>to scope checks to a specific feature in large codebases.