forked from apache/cassandra-java-driver
-
Notifications
You must be signed in to change notification settings - Fork 43
build: add JaCoCo coverage for the unit and integration lanes (3.x) #1018
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
dkropachev
merged 6 commits into
scylladb:scylla-3.x
from
nikagra:feature/DRIVER-892-code-coverage
Aug 31, 2026
Merged
Changes from all commits
Commits
Show all changes
6 commits
Select commit
Hold shift + click to select a range
c04fc29
build: add an opt-in coverage profile with a dedicated argline property
nikagra b21a985
build: add the coverage-report aggregate module
nikagra 2b1a4e8
build: expose coverage through the Makefile
nikagra 8999ecf
ci: collect coverage from the unit and integration lanes
nikagra 6a815e9
docs: document how to produce a coverage report
nikagra 9a0d99f
chore: drop the dead Cobertura harness
nikagra File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,40 @@ | ||
| name: Collect coverage execution data | ||
| description: > | ||
| Uploads the JaCoCo execution data a COVERAGE=true test lane left behind. Factored out because | ||
| every instrumented lane needs it verbatim, and because the layout it produces has to stay in | ||
| step with the step that reverses it in the coverage-report job. | ||
|
|
||
| inputs: | ||
| artifact-name: | ||
| description: > | ||
| Name of the artifact to upload. Has to start with coverage-exec- for the coverage-report | ||
| job's download pattern to match it. | ||
| required: true | ||
|
|
||
| runs: | ||
| using: composite | ||
|
|
||
| steps: | ||
|
|
||
| # Kept under <module>/target/ so the coverage-report job can put the tree straight back where | ||
| # it came from; which lane produced the data is already part of the file name. Only the | ||
| # top-level modules are collected, which is all jacoco:report-aggregate reads. The | ||
| # "Place execution data next to the classes it was recorded against" step reverses exactly | ||
| # this layout -- the two have to be changed together. | ||
| - name: Copy execution data into an artifact tree | ||
| shell: bash | ||
| run: | | ||
| shopt -s nullglob | ||
| mkdir -p coverage-exec | ||
| for exec_file in */target/jacoco-*.exec; do | ||
| mkdir -p "coverage-exec/$(dirname "$exec_file")" | ||
| cp "$exec_file" "coverage-exec/$exec_file" | ||
| done | ||
| find coverage-exec -name '*.exec' -printf '%p\t%s bytes\n' | ||
|
|
||
| - name: Upload execution data | ||
| uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2 | ||
| with: | ||
| name: ${{ inputs.artifact-name }} | ||
| path: coverage-exec/ | ||
| if-no-files-found: warn |
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
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,6 +1,4 @@ | ||
| target/ | ||
| cobertura-history/ | ||
| testing/ | ||
| .settings | ||
| .classpath | ||
| .project | ||
|
|
||
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
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
Oops, something went wrong.
Oops, something went wrong.
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.
Uh oh!
There was an error while loading. Please reload this page.