Skip to content

CI Integration

GitHub Actions Setup

.github/workflows/architecture-check.yml
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_methods

Output Formats

FormatUse Case
terminal (default)Local development — readable output
github-actionsCI — PR review annotations
jsonTool integration — machine-readable

Gradual CI Adoption

Step 1: Start with warnings only

mille.toml
[severity]
dependency_violation = "warning"
- run: mille check --format github-actions
# exits 0 — warnings shown but CI doesn't fail

Step 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-actions

Exit Codes

CodeMeaning
0No violations
1Violations found
3Configuration error