Skip to content

Changelog

This is the first public release of nolapse. It includes the CLI, Go and Python coverage runners, threshold enforcement logic, and a GitHub Action for pull request integration.


All five top-level commands ship in this release:

CommandDescription
nolapse initMeasures current coverage and writes .audit/coverage/baseline.md and nolapse.yaml.
nolapse runCompares current coverage against the baseline, applies thresholds, and exits with the appropriate code.
nolapse baseline updateAppends a new timestamped entry to the baseline audit trail and git-commits the result.
nolapse audit listPrints the last 10 baseline entries from the audit trail.
nolapse versionPrints the CLI version string.

Install via:

Terminal window
go install github.com/nolapse/nolapse-cli/nolapse-cli/cmd/nolapse@latest

The Go coverage runner is built into the CLI. It invokes go test -cover ./... against the target repository and parses the total coverage percentage from the output. No additional tooling is required for Go projects.


The Python coverage runner ships as a subprocess script at nolapse-runner/coverage_runner.py. The CLI invokes it via subprocess, passing the repository path as an argument. The script runs pytest --cov and returns the total coverage percentage.

Requirements for Python projects:

  • pytest installed in the project’s virtual environment.
  • pytest-cov installed in the project’s virtual environment.

The runner path can be overridden by setting the NOLAPSE_RUNNER_PATH environment variable to the absolute path of coverage_runner.py.


nolapse run implements a three-outcome model:

OutcomeConditionDefault exit code
passdelta > -warn_threshold0
warndelta > -fail_threshold and not pass0
faildelta ≤ -fail_threshold1

Default thresholds: warn_threshold = 0.5, fail_threshold = 1.0 (percentage points).

Strict mode (--strict-mode flag or strict_mode: true in nolapse.yaml) promotes warn → exit 1, enabling zero-tolerance enforcement without tightening numeric thresholds.


nolapse init writes a nolapse.yaml file at the repository root. All threshold values and the language setting are configurable here, and all can be overridden per-invocation via CLI flags.

lang: go
warn_threshold: -1.0
fail_threshold: -5.0
strict_mode: false

The nolapse/nolapse-action@v1 GitHub Action wraps the CLI for pull request workflows. Features in this release:

  • Runs nolapse run against the checked-out repository.
  • Posts a coverage table as a PR comment (opt-in via coverage-table input).
  • Creates a GitHub check run with pass/warn/fail status.
  • Accepts warn-threshold, fail-threshold, and strict-mode as inputs to override nolapse.yaml values.
  • Requires a repo-token input (use secrets.GITHUB_TOKEN).

Minimum workflow example:

- uses: nolapse/nolapse-action@v1
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}