PavanMudigonda / jacoco-reporter

GitHub Action to Publish JaCoCo Format Code Coverage XML and attach it to the Workflow Run as a Check Run. Also can enforce Coverage Quality Gate.
https://linkedin.com/in/PavanMudigonda
MIT License
63 stars 7 forks source link

Display Coverage Percent along with Check #26

Closed SatheeshJM closed 1 year ago

SatheeshJM commented 1 year ago

Is your feature request related to a problem? Please describe. There is no way to know just coverage percentage in the pull request page. One has to go inside the job to find out coverage.

Describe the solution you'd like If the check contains coverage percent, it would be super useful. The attached screenshot contains a Junit Report summary. Something similar containing coverage percentage would be super useful.

image
PavanMudigondaTR commented 1 year ago

@SatheeshJM Hi Satheesh, Thanks for your input. I will check if i can add it quickly today !

PavanMudigondaTR commented 1 year ago

Is your feature request related to a problem? Please describe. There is no way to know just coverage percentage in the pull request page. One has to go inside the job to find out coverage.

Describe the solution you'd like If the check contains coverage percent, it would be super useful. The attached screenshot contains a Junit Report summary. Something similar containing coverage percentage would be super useful.

image

Could you please send me link to the Junit Repot Action you are referrring to so i can understand better !

SatheeshJM commented 1 year ago

@PavanMudigondaTR Thank you for the quick response!

This is the Github Action I'm using - https://github.com/mikepenz/action-junit-report

This is my current setup

image

I was digging a bit into their code base, I believe the update happens at https://github.com/mikepenz/action-junit-report/blob/ab07dd7abefd456d92ecbeb22f81392fafe3d528/src/annotator.ts#L65

PavanMudigondaTR commented 1 year ago

@SatheeshJM I am working on implementing this ! I will let you know once done. sorry for the delay to get to this !

SatheeshJM commented 1 year ago

@PavanMudigondaTR no issues! I came up with a hacky working solution for our use..

here is the link if it helps - https://github.com/SatheeshJM/jacoco-reporter/releases/tag/v4.6_jm_patch_4

(diff can be found here - https://github.com/SatheeshJM/jacoco-reporter/compare/7194fecaeda54ed9f8b08a4efbbfbf4c1b5bb027..v4.6_jm_patch_4 )

PavanMudigondaTR commented 1 year ago

@SatheeshJM Please let me know if, if this is sufficient enough ?

image
SatheeshJM commented 1 year ago

This seems pretty good! Thank you @PavanMudigondaTR

PavanMudigonda commented 1 year ago

@SatheeshJM

I have implemented this in v4.8. Please try.