{{ message }}
Add test & coverage reporting to PR comments and master baseline#4292
Merged
Add test & coverage reporting to PR comments and master baseline#4292
Conversation
Enables automatic test coverage analysis via the JaCoCo Gradle plugin. Generates HTML and XML reports, excluding generated ANTLR and shaded code. Usage: ./gradlew test jacocoTestReport https://claude.ai/code/session_01R1nvwA9Gc7gv8Uxwyvy83u
Add Madrapps/jacoco-report action (pinned to commit SHA for supply chain safety) to post a sticky coverage summary comment on PRs. The action runs only in the matrix job that generates the JaCoCo report and updates the same comment on each new commit. https://claude.ai/code/session_01R1nvwA9Gc7gv8Uxwyvy83u
Contributor
Contributor
|
Swap the third-party JaCoCo action for a custom github-script step that parses the JaCoCo XML and posts a per-package coverage breakdown (line, branch, method) as a PR comment. Also uploads the full HTML report as a build artifact for class-level drill-down. https://claude.ai/code/session_01R1nvwA9Gc7gv8Uxwyvy83u
- Remove EnricoMi/publish-unit-test-result-action - Restructure build matrix to use labeled includes (java11/17/21/25) - Each test job parses JUnit XML results and uploads stats as artifact - New test-summary job collects all stats, compares against committed baseline (test-stats-baseline.json), and posts a PR comment showing per-version totals with deltas (passed/failed/errors/skipped) - The summary job commits the updated baseline to the PR branch so it arrives on master through the normal merge flow - Uses [skip ci] on baseline commits to prevent infinite loops https://claude.ai/code/session_01R1nvwA9Gc7gv8Uxwyvy83u
Consolidate the two separate PR comments (test results + JaCoCo coverage) into one combined comment. Baseline is now only updated on master, never on PR branches. - Rename test-stats-baseline.json → test-baseline.json with tests + coverage sections - PR workflow: upload JaCoCo XML as artifact, post single unified comment - PR workflow: change contents permission to read (no more bot commits on PRs) - Master workflow: add labeled matrix, test parsing, JaCoCo generation - Master workflow: add update-baseline job that commits test-baseline.json Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Contributor
Test ReportTest Results
Code Coverage (Java 25)
Changed Class Coverage (951 classes)
|
Parse per-class counters from JaCoCo XML and compare against master baseline. The PR comment now shows a collapsible table of classes where line, branch, or method coverage changed. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Test results: green for more total/passed, red for more failed/errors. Coverage deltas: green for increase, red for decrease. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
e.g. graphql.execution.instrumentation.Foo$Bar → g.e.i.Foo$Bar Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Strip $InnerClass suffixes from class names and remove emoji from per-class delta cells. The +/- sign already conveys direction. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Inner class names are kept but wrapped onto a second line at the $ boundary using <br> to keep the table narrow. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
The testng task was silently broken: useJUnitPlatform() in the global
tasks.withType(Test) block overrode useTestNG(), and the task lacked
testClassesDirs/classpath config. Guard useJUnitPlatform() to skip
testng tasks, fix the testng task config, add testngWithJava{11,17,21}
tasks, and wire them into both CI workflows with proper result parsing.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Add a coverage gate in the test-summary job that checks line, branch, and method coverage against the master baseline. The PR comment is posted first so developers always see the report, then core.setFailed() is called if any metric decreased. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
The TCK uses thread-locals to track recursion. When supplyAsync runs on the shared ForkJoinPool, tasks can complete on the same thread causing false spec303 failures. Use Executors.newSingleThreadExecutor() for all remaining TCK test classes, matching the earlier fix in dcb9b05. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
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.

Summary
g.e.Foo) and<br>-wrapped inner classes for compact rowstest-baseline.jsonis auto-updated with test counts, overall coverage, and per-class coverage for future PR comparisonscoverage.overall(line/branch/method) +coverage.classes(per-class counters)Files changed
test-baseline.jsonadded.github/workflows/pull_request.yml— unified test report comment with per-class coverage deltas.github/workflows/master.yml— baseline writer with per-class coverage extraction🤖 Generated with Claude Code