enolaDocsCI setup

Documentation

CI setup

Run the same baseline comparison in pull requests and use exit codes to enforce selected rules.

01 · GitHub Actions

Add the maintained action

The action compares each pull request with its base commit, adds annotations to affected lines, and writes a summary.

.github/workflows/architecture.ymlyaml
name: Architecture
on:
  pull_request:
  merge_group:

jobs:
  enola:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v7
        with:
          fetch-depth: 0
      - uses: enola-labs/enola-action@v2
        with:
          fail-on: layers,cycles
          min-confidence: "0.8"
min-confidence lowers the floor within the selected explainers; 0.8 includes inferred findings that cannot reach the default 1.00. Pin the action to the release or commit required by your organization. Keep fetch-depth: 0 so the pull-request base is available.

02 · Other CI

Use the CLI exit code

Install Enola, create a baseline from the target branch, restore the proposed change, and run check. The exact checkout commands depend on the CI provider.

Gate selected categoriesshell
enola baseline pin
# restore or check out the proposed change
enola check --fail-on=layers,cycles

Exit code 0 passes, 1 is a policy failure, 2 is an invocation error, and 3 means the snapshots are not comparable.

03 · Policy

Select what can fail

There is no default failure policy. Start with categories the team already agrees to enforce. Use --warn-only while evaluating a policy without failing pull requests.

Report without failingshell
enola check --fail-on=layers,cycles --warn-only

04 · Reproducibility

Keep both snapshots comparable

  • Use the same Enola version for the baseline and current snapshot.
  • Use the same ignore configuration and repository identity.
  • Record the receipt with the job output.
  • Do not treat a dirty worktree as equivalent to its recorded commit.

05 · Output

Publish useful evidence

CI-native formatsshell
enola check --format=annotations --host=github
enola check --format=annotations --host=buildkite
enola check --format=sarif > enola.sarif

Annotations produce native messages for GitHub Actions or Buildkite. SARIF works with code-scanning systems. Use --json for custom integrations. Use the command exit code as the verdict.