Skip to content
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

Code Coverage #11

Merged
merged 21 commits into from
Apr 24, 2021
Merged

Code Coverage #11

merged 21 commits into from
Apr 24, 2021

Conversation

natescherer
Copy link
Contributor

Okay, I have functional code coverage added. It uses the same functionality as the primary test report vis-a-vis posting the results via check run and badge and test results to the gist.

I'm happy with the code coverage testing functionality itself but I'm less happy with the report generated. I used https://github.com/danielpalme/ReportGenerator to convert from the JaCoCo to a text format and generate a code coverage badge. Unfortunately, it doesn't have markdown output (couldn't really find anything that would do JaCoCo to MD), and the HTML outputs it generated were too big for check runs or seemingly Gists.

The best way to generate the report would probably be doing an XSL based translation to Markdown like you are doing for the test reports, but I'm afraid that's outside of what I know how to do and I don't have time to learn at this moment.

Perhaps this could just be regarded as a first pass at code coverage with better report formatting coming in the future?

Here's an example of the outputs:

https://github.com/natescherer/PoshEmail/actions/runs/733609157
https://gist.github.com/natescherer/797ca586d176e0af436182c772e35c24

I would welcome your thoughts and comments.

@natescherer natescherer mentioned this pull request Apr 9, 2021
@natescherer
Copy link
Contributor Author

Alternate option I just thought of: scrap the in-action coverage file conversion and recommend using a third-party service like codecov.io. I just did some initial testing and it consumes and reports on pester code coverage files just fine with a little massaging.

@natescherer
Copy link
Contributor Author

Update: don't merge this yet. I've got the bones of an XSLT working for jacoco. ReportGenerator mysteriously stopped installing on Windows agents and I decided to take another crack at it.

@natescherer
Copy link
Contributor Author

natescherer commented Apr 16, 2021

Okay, this is now ready to merge and I have no qualms with how this works! XSL was easier to learn than I anticipated.

See https://gist.github.com/natescherer/120b8e0b4fa7a2a68ba69f7ddc2c5b0a for example output.

@ebekker ebekker merged commit bb711b3 into zyborg:master Apr 24, 2021
@ebekker
Copy link
Member

ebekker commented Apr 24, 2021

This looks awesome, thanks for the contribution!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants