Skip to content

ci: add coverage targets - #88

Merged
uniqueg merged 1 commit into
devfrom
ci/coverage-targets
Nov 7, 2026
Merged

uniqueg merged 1 commit into
devfrom
ci/coverage-targets

Conversation

@uniqueg

@uniqueg uniqueg commented Nov 7, 2026 •

Copy link
Copy Markdown
Member

Summary

Coverage targets, as foca, cloud-registry and proTES have them:

  • pom.xml: JaCoCo merges the unit and integration test data (jacoco-merged.exec) and check fails ./mvnw verify, and so the Test job and the gate CI passed, below 60% of the lines or 45% of the branches. The tests cover 62% and 47% now; raise the floors as coverage grows.
  • codecov.yml: the project's coverage must not drop (threshold 0.5 percentage points), and the changed lines of each pull request must be covered completely (100%, as in the other repositories). The Codecov statuses are not required checks.
  • docs/development.md describes both.

Closes #82 (part of #65)

Verification

  • With floors of 99%, ./mvnw -B clean verify (in eclipse-temurin:8-jdk, Java 8 as CI) failed with "lines covered ratio is 0.62, but expected minimum is 0.99" and "branches covered ratio is 0.47"; with the floors of this PR it passes ("All coverage checks have been met", 111 unit and 53 integration tests).
  • The image build (-Dmaven.test.skip=true package) doesn't reach verify, so it is unaffected.
  • CI: all checks passed (gate CI passed, Test with the coverage check, Smoke test, Scan image, Docs, Lint, CodeQL, Codecov).

Lane

Light lane: build and CI configuration only (a coverage check with its floor), no secrets, permissions or release workflow; I reviewed the diff myself.

Declined review findings

None.

Open questions

None.

🤖 Generated with Claude Code

Summary by Sourcery

Add coverage quality gates for combined test results and pull-request changes.

Enhancements:

  • Enforce minimum combined unit and integration test coverage of 60% for lines and 45% for branches during the Maven verification phase.
  • Configure Codecov to prevent project coverage regressions and require complete coverage for pull-request changes.

Documentation:

  • Document the coverage thresholds and Codecov requirements for development builds and pull requests.

Fail ./mvnw verify if the unit and integration tests together cover
less than 60% of the lines or 45% of the branches (JaCoCo merge and
check; now 62% and 47%), and set Codecov targets: no drop of the
project's coverage, full coverage of the changes of a pull request.

Closes #82

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@sourcery-ai

sourcery-ai Bot commented Nov 7, 2026

Copy link
Copy Markdown

Reviewer's Guide

Configuration

Merge unit- and integration-test JaCoCo data and enforce local coverage floors, while configuring Codecov to guard project coverage and require full coverage of changed lines.

  • codecov.yml L1-15
  • pom.xml L340-388

Documentation

Document the local JaCoCo coverage floors and the Codecov pull-request checks for contributors.

  • docs/development.md L23-28

Tips and commands

Interacting with Sourcery

  • Trigger a new review: Comment @sourcery-ai review on the pull request.
  • Continue discussions: Reply directly to Sourcery's review comments.
  • Generate a GitHub issue from a review comment: Ask Sourcery to create an
    issue from a review comment by replying to it. You can also reply to a
    review comment with @sourcery-ai issue to create an issue from it.
  • Generate a pull request title: Write @sourcery-ai anywhere in the pull
    request title to generate a title at any time. You can also comment
    @sourcery-ai title on the pull request to (re-)generate the title at any time.
  • Generate a pull request summary: Write @sourcery-ai summary anywhere in
    the pull request body to generate a PR summary at any time exactly where you
    want it. You can also comment @sourcery-ai summary on the pull request to
    (re-)generate the summary at any time.
  • Generate reviewer's guide: Comment @sourcery-ai guide on the pull
    request to (re-)generate the reviewer's guide at any time.
  • Resolve all Sourcery comments: Comment @sourcery-ai resolve on the
    pull request to resolve all Sourcery comments. Useful if you've already
    addressed all the comments and don't want to see them anymore.
  • Dismiss all Sourcery reviews: Comment @sourcery-ai dismiss on the pull
    request to dismiss all existing Sourcery reviews. Especially useful if you
    want to start fresh with a new review - don't forget to comment
    @sourcery-ai review to trigger a new review!

Customizing Your Experience

Access your dashboard to:

  • Enable or disable review features such as the Sourcery-generated pull request
    summary, the reviewer's guide, and others.
  • Change the review language.
  • Add, remove or edit custom review instructions.
  • Adjust other review settings.

Getting Help

@codecov

codecov Bot commented Nov 7, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 56.39%. Comparing base (d62106c) to head (a08786a).

Additional details and impacted files
@@           Coverage Diff           @@
##              dev      #88   +/-   ##
=======================================
  Coverage   56.39%   56.39%           
=======================================
  Files          66       66           
  Lines        2167     2167           
  Branches      236      236           
=======================================
  Hits         1222     1222           
  Misses        804      804           
  Partials      141      141           

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@uniqueg
uniqueg marked this pull request as ready for review November 7, 2026 08:08

@sourcery-ai sourcery-ai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hey - I've reviewed your changes and they look great!

Linked issues

#82 ci: add coverage targets · 4 of 4 met

# Requirement Status Notes
1 Set a Codecov project target so coverage does not drop. ✅ Met codecov.yml sets the project target to auto with a 0.5% threshold.
2 Set a Codecov patch target for the changed lines of each pull request. ✅ Met codecov.yml sets the patch target to 100%.
3 Check merged unit and integration coverage in ./mvnw verify, failing below the current coverage floor. ✅ Met pom.xml merges jacoco.exec and jacoco-it.exec, then checks for at least 60% line coverage and 45% branch coverage during verify.
4 Document how coverage is checked for developers. ✅ Met docs/development.md describes the JaCoCo floors and Codecov targets.

Sourcery assessment

Approved.


Sourcery is free for open source - if you like our reviews please consider sharing them ✨

@uniqueg
uniqueg merged commit a72db27 into dev Nov 7, 2026
43 checks passed
@uniqueg
uniqueg deleted the ci/coverage-targets branch November 7, 2026 08:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

ci: add coverage targets

1 participant