Skip to content

Added Delta Coverage plugin to present the code coverage of all code in a PR or push - #222

Merged
afu5 merged 15 commits into
mainfrom
fu/add-delta-coverage
May 18, 2026
Merged

Added Delta Coverage plugin to present the code coverage of all code in a PR or push#222
afu5 merged 15 commits into
mainfrom
fu/add-delta-coverage

Conversation

@afu5

@afu5 afu5 commented Apr 27, 2026

Copy link
Copy Markdown
Contributor

Estimated time to review: small

Summary of changes:

  • Added Delta Coverage version 2.5.0 (later versions don't support Java 11) to build.gradle.
    • Diff files are generated in comparison to main. If you want to compare one branch with another branch, you can change the diffSource in deltaCoverageReport in build.gradle. Change the .set() parameter in diffSource.git.diffBase.set("refs/remotes/origin/main") to the branch you want to compare to.
  • Added publish-delta-coverage job to build.yml, which runs delta coverage on each build action and publishes a summary in the action

How to verify changes:

  • Pull branch
  • Run ./gradlew clean test deltaCoverage
  • Verify that no changes are detected (you should get a table with no rows of file changes and NaN total changes)
  • Add a few lines of changes in a Java file
    • I added the following to PottsModuleProliferationVolumeBasedDivision:
    • // TEST CHANGES:
       if (true) {
           System.out.println("tested");
       }
       if (cell.getVolume() < 0) {
           System.out.println("untested");
       }
      
  • Make a test commit with your changes
  • Run ./gradlew clean test deltaCoverage
  • Click the [DELTA_REPORT] link and see if line-by-line diff changes are expected
    • The file(s) that you changed lines in should be listed
    • Code that you expect to be tested should be green, and code that is untested should be red
  • Make a test push with your changes
  • Look at GitHub actions summary for build, look at the table summary of changes, and verify the coverage is as expected

Resolves #221

@afu5
afu5 marked this pull request as draft April 27, 2026 16:43
@afu5
afu5 requested review from a team, Jannetty, allison-li-1016, cainja, jacob-evarts, jessicasyu, kristaphommatha and pohaoc2 and removed request for a team April 27, 2026 19:16
@afu5 afu5 added priority: low Should be fixed if time permits but can be postponed type: admin Management of project or repository size: small Estimated size of issue or PR is small labels Apr 27, 2026
@afu5
afu5 marked this pull request as ready for review April 27, 2026 19:19
Comment thread .github/workflows/build.yml

@kristaphommatha kristaphommatha left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This ran on my machine :) LGTM

@afu5
afu5 merged commit 23293e4 into main May 18, 2026
7 checks passed
@afu5
afu5 deleted the fu/add-delta-coverage branch May 18, 2026 16:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

priority: low Should be fixed if time permits but can be postponed size: small Estimated size of issue or PR is small type: admin Management of project or repository

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Have evaluation of test coverage in new PRs

5 participants