Quickstart
This guide walks through the four steps needed to get nolapse protecting your repository’s coverage. By the end you will have a baseline committed to git and a GitHub Action that enforces coverage on every pull request.
Time to complete: under 30 minutes.
Step 1 — Install nolapse
Section titled “Step 1 — Install nolapse”go install github.com/nolapse/nolapse-cli/nolapse-cli/cmd/nolapse@latestConfirm the binary is on your PATH:
nolapse version# nolapse v0.1.0For full prerequisite details (Go version, Python setup) see Install nolapse.
Step 2 — Create your baseline
Section titled “Step 2 — Create your baseline”From the root of your repository, run:
# Go projectnolapse init --repo .
# Python projectnolapse init --repo . --lang pythonnolapse measures your current coverage, writes the result to .audit/coverage/baseline.md, and creates a nolapse.yaml config file.
.├── .audit/│ └── coverage/│ └── baseline.md ← created by init└── nolapse.yaml ← created by initThe baseline file records the coverage percentage, a UTC timestamp, and the current git commit SHA:
coverage: 82.50%timestamp: 2026-01-15T09:00:00Zcommit: a1b2c3d4e5f6a1b2c3d4e5f6a1b2c3d4e5f6a1b2Commit both files so they travel with your code:
git add .audit/coverage/baseline.md nolapse.yamlgit commit -m "chore: add nolapse coverage baseline"Step 3 — Run your first coverage check
Section titled “Step 3 — Run your first coverage check”nolapse run --repo .Example output when coverage has improved since the baseline:
file baseline coverage PR coverage delta outcome. 82.50% 84.10% +1.60% pass
outcome: pass delta: +1.60 coverage: 84.10% baseline: 82.50% outcome: passwarn_threshold: 0.5 fail_threshold: 1.0Coverage delta: +1.60% (threshold: 0.5%) passThe exit code is 0 for pass or warn outcomes, 1 for a fail (regression exceeds the fail threshold). CI systems use this exit code to block or allow merges.
See Your First Enforcement for a deep dive on pass/warn/fail logic and flag overrides.
Step 4 — Add the GitHub Action
Section titled “Step 4 — Add the GitHub Action”Create .github/workflows/coverage.yml in your repository:
name: Coverage check
on: pull_request:
jobs: coverage: runs-on: ubuntu-latest steps: - uses: actions/checkout@v4
- name: Run nolapse uses: nolapse/nolapse-action@v1 with: repo-token: ${{ secrets.GITHUB_TOKEN }} warn-threshold: "0.5" fail-threshold: "1.0"Push this file on a branch and open a pull request. nolapse will run as a check, post a coverage table as a PR comment, and fail the check if the regression exceeds your fail-threshold.
What’s next
Section titled “What’s next”- Your First Baseline — understand every field in
baseline.mdand when to update it. - Your First Enforcement — learn how pass, warn, and fail outcomes are determined.
- CLI Reference — all flags, defaults, and exit codes.