Skip to content

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

Open
afu5 wants to merge 15 commits intomainfrom
fu/add-delta-coverage
Open

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

Conversation

@afu5
Copy link
Copy Markdown

@afu5 afu5 commented Apr 27, 2026

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
uses: actions/setup-java@v4
with:
java-version: '11'
distribution: 'corretto'
Copy link
Copy Markdown
Contributor

@allison-li-1016 allison-li-1016 Apr 27, 2026

Choose a reason for hiding this comment

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

Java corretto might be specific to AWS instances -- is there a reason why we specify this type of distribution?

Maybe someone should try building locally to see if this would work outside of an AWS instance as well.

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

4 participants