Skip to content

ci: aggregate JaCoCo coverage and gate PRs via Codecov - #144

Closed
dkasimovskiy wants to merge 1 commit into
masterfrom
feat/jacoco-coverage-gating
Closed

dkasimovskiy wants to merge 1 commit into
masterfrom
feat/jacoco-coverage-gating

Conversation

@dkasimovskiy

Copy link
Copy Markdown
Contributor

What & why

Test coverage was generated by JaCoCo but never collected: the coverage jobs in tests.yml were commented out, and nothing blocked PRs that lowered coverage.

This PR collects JaCoCo execution data from all CI test jobs, builds a single aggregate report across all modules, uploads it to Codecov, and configures Codecov statuses to fail when project or patch coverage decreases.

Changes

  • .github/workflows/tests.yml
    • unit / box-integration / crud-integration jobs upload their *.exec files as artifacts (matrix jobs get a versioned exec filename so runs do not overwrite each other).
    • new merge-jacoco-report job downloads the exec files into the module target/ dirs and runs ./mvnw -DskipTests verify -pl jacoco-coverage-aggregate-report -am, which builds classes and generates one jacoco.xml, then uploads it to Codecov.
    • removed the dead commented-out merge job.
  • jacoco-coverage-aggregate-report/pom.xml
    • added tarantool-spring-data-core and tarantool-spring-data-27…40 dependencies — previously spring-data was missing from the aggregated report entirely.
    • bound report-aggregate to verify; invoking it with -pl without -am produced an empty report because dependencies were not in the reactor.
    • testcontainers is now compile scope in this module (BOM sets test), otherwise its classes are excluded from the report.
  • codecov.yml — project and patch statuses use target: auto, threshold: 0%.

Verified locally: aggregate report contains 573 classes, 325 of them from spring-data (including spring-data-core, which is exercised only by the version modules' tests).

Follow-ups (not in code)

  • Install the Codecov GitHub App for tarantool/tarantool-java-sdk / add CODECOV_TOKEN secret if required.
  • In branch protection for master, require status checks codecov/project and codecov/patch.

Checklist

  • Tests — n/a (CI/config change)
  • Changelog — n/a
  • Documentation — n/a
  • Commit messages comply with the guideline

Related issues: —

Collect jacoco exec files from unit and integration jobs, build an
aggregate report over all modules (including spring-data and
testcontainers), and upload it to Codecov. codecov.yml makes project and
patch coverage statuses fail when coverage decreases.

Co-Authored-By: Claude <noreply@anthropic.com>
@dkasimovskiy
dkasimovskiy force-pushed the feat/jacoco-coverage-gating branch from 57ea986 to b3c1775 Compare October 29, 2026 14:30
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.

1 participant