Repository navigation
Add GitHub Actions CI with JaCoCo coverage badges - #2
Merged
Merged
Conversation
Mirrors the CI setup from simple-websocket-service: - CI workflow runs ./mvnw clean test on JDK 25 (Temurin) for pushes and PRs to main, generates JaCoCo coverage/branch badges and commits them on pushes to main - Dependabot keeps GitHub Actions versions up to date weekly - JaCoCo 0.8.15 (Java 25 class files need 0.8.14+) wired into the test phase - CI and coverage badges in README Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_012MLyPXGHeCc1fvTeB8JnT2
- lombok.config marks generated methods with @lombok.Generated so JaCoCo ignores @DaTa equals/hashCode/toString (same as simple-websocket-service) - CI badge shows the status of main instead of the latest run on any branch Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_012MLyPXGHeCc1fvTeB8JnT2
andreasarf
changed the base branch from
claude/practical-dirac-t5uv58
to
main
October 15, 2026 11:42
# Conflicts: # pom.xml
- Default the workflow token to contents: read; only a separate badges job, which runs on pushes to main, gets contents: write - Badges job checks out the tip of main and is serialized with a concurrency group so the auto-commit fast-forwards - Skip badge generation on pull requests - Pin actions/checkout and actions/setup-java to commit SHAs like the other actions (setup-java bumped to v6.1.0) - Let Dependabot also update Maven dependencies Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_012MLyPXGHeCc1fvTeB8JnT2
- Workflow-level concurrency cancels superseded PR runs and runs main pushes one at a time, so an older run can't overwrite newer badges - timeout-minutes on both jobs - workflow_dispatch to regenerate badges without a commit - Don't persist the checkout token in the test job - Group Dependabot Maven minor/patch updates into one PR Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_012MLyPXGHeCc1fvTeB8JnT2
- Badges job skips the commit unless the run's commit is still the latest non-badge commit on main - Single ref condition for the main-only steps - Keep the coverage artifact for 1 day; it is only handed to the next job Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_012MLyPXGHeCc1fvTeB8JnT2
5 tasks done
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
Adds the CI setup that
andreasarf/simple-websocket-serviceuses, adapted for this project and hardened over three review rounds..github/workflows/ci.ymlmain, plusworkflow_dispatch. Thetestjob runs./mvnw -B clean teston Temurin JDK 25 with the Maven cache.main, a separatebadgesjob generates JaCoCo coverage and branch-coverage badges and commits them to.github/badges/.contents: read. Only thebadgesjob, which never runs on PRs, getscontents: write.mainpushes one at a time, in order, and cancels superseded PR runs. Thebadgesjob also skips the commit when its run's commit is no longer the newest non-badge commit onmain, so re-running an old run can't put stale numbers back.timeout-minuteson both jobs. The coverage artifact is kept for 1 day.Other files
.github/dependabot.yml: weekly updates for GitHub Actions and Maven. Maven minor and patch updates come grouped in one PR.pom.xml:jacoco-maven-plugin0.8.15 (Java 25 needs 0.8.14 or newer), wired intotest.lombok.config: marks Lombok-generated code so JaCoCo ignores it, the same as the websocket repo.main), plus coverage and branch-coverage badges.The coverage badge images appear after the first CI run on
maincommits them.mainhas no branch protection, so the bot push is allowed.Test plan
./mvnw -B clean teston OpenJDK 25 passes, and the JaCoCo report is generatedtestpassed;badgescorrectly skipped on PRs)mainrun commits the badges (checked after merge)🤖 Generated with Claude Code
https://claude.ai/code/session_012MLyPXGHeCc1fvTeB8JnT2