Skip to content

test: raise statement coverage above 80% and add CI coverage gate - #396

Merged
joshua-temple merged 1 commit into
mainfrom
feat/ossf-coverage-gate
Jun 30, 2026
Merged

test: raise statement coverage above 80% and add CI coverage gate#396
joshua-temple merged 1 commit into
mainfrom
feat/ossf-coverage-gate

Conversation

@joshua-temple

Copy link
Copy Markdown
Collaborator

Problem

cascade computes test coverage in CI but only echoes it to the log: there is no enforced threshold and no public signal. Overall statement coverage sits at 77.4%, below the 80% needed for the OpenSSF Best Practices test_statement_coverage80 (Silver) criterion.

Stacked on #395.

Fix

  • Raise overall statement coverage from 77.4% to 82.6% with targeted tests for the lowest-covered core packages (promote, hotfix, reset, orchestrate, rollback, release, changelog, version).
  • Add a coverage threshold gate to pr.yaml and validate.yaml: after the existing coverage computation, fail the job if total statement coverage drops below 80%.
  • Add a coverage badge to README.

The gate is self-contained (an awk comparison on go tool cover -func output); no external coverage service or secret is required.

Verification

  • go build ./... passes.
  • go test -race ./... passes on all touched packages.
  • golangci-lint run ./... clean; actionlint clean on both workflows.
  • Total statement coverage measured at 82.6% (>= 80% gate, with margin).

Notes

  • The README badge is static (82.6%); the CI gate is the live enforcement.
  • Coverage is reported against the main module; the Docker-based e2e module is unchanged.

@joshua-temple
joshua-temple force-pushed the feat/ossf-signed-releases branch from b7f5f89 to d96c849 Compare June 27, 2026 15:59
@joshua-temple
joshua-temple force-pushed the feat/ossf-coverage-gate branch from 1646254 to 659a0c3 Compare June 27, 2026 15:59
@joshua-temple
joshua-temple force-pushed the feat/ossf-signed-releases branch from d96c849 to 868951f Compare June 27, 2026 16:26
@joshua-temple
joshua-temple force-pushed the feat/ossf-coverage-gate branch from 659a0c3 to 5a49f23 Compare June 27, 2026 16:26
@joshua-temple joshua-temple added the test Adding or correcting tests label Jun 27, 2026
@joshua-temple
joshua-temple force-pushed the feat/ossf-signed-releases branch from 868951f to 642277e Compare June 30, 2026 20:19
Signed-off-by: Joshua Temple <joshua.temple@stablekernel.com>
@joshua-temple
joshua-temple force-pushed the feat/ossf-coverage-gate branch from 5a49f23 to 3625c6c Compare June 30, 2026 20:19
@joshua-temple
joshua-temple changed the base branch from feat/ossf-signed-releases to main June 30, 2026 20:19
@joshua-temple
joshua-temple marked this pull request as ready for review June 30, 2026 20:23
@joshua-temple
joshua-temple merged commit 7da4fb0 into main Jun 30, 2026
21 of 25 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

test Adding or correcting tests

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant