Repository navigation
Conversation
CI already ran the unit tests with JaCoCo but left the data inside the builder image. Export it, record coverage of the server under the smoke tests too, and merge both into one report. - Bump JaCoCo to 0.8.14: the smoke-test images run Java 21, which 0.8.8 predates. stageCoverage collects the unit-test data plus the agent and CLI into build/coverage, which the Dockerfile now exports. - ci/coverage.compose.yml attaches the agent when JACOCO_AGENT is set. configure-from-env splits VMOPTIONS on commas, so the agent gets only destfile. run-configuration.sh stops the server with a long timeout so the agent can write its data on shutdown. - ci/coverage-report.sh merges everything against the distribution jars the smoke tests ran, limited to our own jars. Signed-off-by: Nico Piel <nico.piel@hotmail.de>
- coverage-report.sh fails when the unit-test or smoke-test data or the distribution jars are missing, instead of publishing a partial report. - The coverage job no longer runs after a failed build. - run-configuration.sh removes an earlier run's data file, since the agent appends to it. Signed-off-by: Nico Piel <nico.piel@hotmail.de>
NicoPiel
requested review from
a team,
gibson9583,
jonbartels,
kayyagari,
kpalang,
mgaffigan,
pacmano1 and
ssrowe
October 28, 2026 22:38
Contributor
|
Nico and I talked about this in chat. Merging this PR doubles report coverage data: This data will show us un-covered classes and improve test coverage. |
jonbartels
previously approved these changes
Oct 29, 2026
Contributor
Author
|
I'll also add a sonar config to this PR. |
Add the SonarQube Gradle plugin and point every module at the merged report, so `./gradlew sonar -Dsonar.host.url=... -Dsonar.token=...` picks up unit and smoke-test coverage. The property is set per module because JaCoCo's per-module default would otherwise override it. ci/coverage-report.sh now works on the local build layout (server/setup, build/coverage, ci/coverage), so anyone can produce the report; the CI job lays its artifacts out the same way. Signed-off-by: Nico Piel <nico.piel@hotmail.de>
jonbartels
approved these changes
Oct 29, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
CI already ran the unit tests with JaCoCo (
-Pcoverage=true), but the data stayed inside the Docker builder image. This PR exports it, records coverage of the server while the smoke tests run, and merges both into a single report, published as theCoverage Reportartifact. Coverage is off onmain, as before.Changes
stageCoveragegathers the unit-test.execfiles, the JaCoCo agent and the CLI intobuild/coverage. The Dockerfile exports that folder with the test results.ci/coverage.compose.ymlattaches the agent to the server whenJACOCO_AGENTis set.configure-from-envsplitsVMOPTIONSon commas, so the agent gets onlydestfileand records every class. The report is limited to our own jars.ci/run-configuration.shstops the server with a 120s timeout beforedown, so the agent can write its data on shutdown. Java is PID 1 through theexecchain, so it receives the SIGTERM.ci/coverage-report.shmerges all the data against the distribution jars the smoke tests ran. It fails if any of the inputs are missing.coveragejob merges them.verification-metadata.xmlregenerated on a cold cache with CI's flags.Sonar
./gradlew sonar -Dsonar.host.url=... -Dsonar.token=...analyzes the project with the merged report (build/coverage/report/coverage.xml). The URL and token stay on the command line. Every module points at that report, because otherwise JaCoCo's per-module default overrides it. The project key defaults tooieand can be changed with-Dsonar.projectKey. SonarCloud also needs-Dsonar.organization.ci/coverage-report.shnow works on the local build layout, so anyone can produce the report (steps inci/README.md). The CI job lays its artifacts out the same way.Testing
build dist stageCoverage -PdisableSigning=true -Pcoverage=truepasses dependency verification.🤖 Generated with Claude Code