CI Integration
GitHub Actions Setup
name: Architecture Check
on: [push, pull_request]
jobs: mille: runs-on: ubuntu-latest steps: - uses: actions/checkout@v4
- name: Install mille (cargo) run: cargo install mille
- name: Check architecture run: mille check --format github-actions--format github-actions Output
Violations appear as annotations directly in PR code reviews:
::error file=src/usecase/order.rs,line=3::External violation: 'sqlx' is not allowed in 'usecase' (import: sqlx)::error file=src/main.rs,line=15::Call pattern violation: 'find_user' is not in allow_methodsOutput Formats
| Format | Use Case |
|---|---|
terminal (default) | Local development — readable output |
github-actions | CI — PR review annotations |
json | Tool integration — machine-readable |
Gradual CI Adoption
Step 1: Start with warnings only
[severity]dependency_violation = "warning"- run: mille check --format github-actions # exits 0 — warnings shown but CI doesn't failStep 2: Enforce once violations are fixed
[severity]dependency_violation = "error"npm Install Example
- name: Install mille (npm) run: npm install -g @makinzm/mille
- name: Check architecture run: mille check --format github-actionsExit Codes
| Code | Meaning |
|---|---|
0 | No violations |
1 | Violations found |
3 | Configuration error |