config-file-validator icon indicating copy to clipboard operation
config-file-validator copied to clipboard

Publish HTML Unit Test Coverage Report

Open kehoecj opened this issue 1 year ago • 4 comments

Go's coverage tool can export the coverage results into an HTML report. It would be really beneficial for the maintainers to be able to see the HTML coverage report as part of a PR to ensure that all critical code is getting coverage. It would also be nice to link the coverage badge to the coverage report generated by the main branch to drill down into the current coverage.

kehoecj avatar Oct 18 '23 22:10 kehoecj

@kehoecj Hi, I'm interesting in this issue. Can you use the third party services such as codecov or coveralls? Because I consider that they are more friendly and user experience than a home made html coverage site.

https://coveralls.io/ https://about.codecov.io/

u5surf avatar Oct 20 '23 10:10 u5surf

@u5surf It's yours if you'd like it! We're not able to use 3rd party services at this time. We can use whatever is available in Github itself though. I have a PR out that should get merged today that implements local coverage badges for that reason. You might want to wait on that to get merged to get started since it's already handling the coverage report generation. I was thinking we might be able to use Github pages but we already use that for our splash page. I don't know if you can host different sites for different branches.

kehoecj avatar Oct 20 '23 13:10 kehoecj

@kehoecj

We're not able to use 3rd party services at this time.

Why can't you choose to use these services? It is no risk to publish some sensitive data because it is the OSS production which has already exposed the code on publish. Even if you concerned about the security risk e.g we expose unconsiously somewhat password or credentials, we have better to be protected another processes. Moreover these services are generally free to use in OSS product. I mean that it's quite defacto standerd in OSS to use these SaaS products instead you make and operate the coverage site yourself. Of course, we can make it ourselves, but generally it is not better choice to spend much costs to maintain its coverage site which is different from the essentials of the OSS product.

https://medium.com/@jonjo89/tutorial-getting-started-with-code-coverage-on-your-github-repositories-fd6b1fc7579d#:~:text=1.-,What%20is%20code%20coverage%3F,is%20run%20by%20the%20tests.

u5surf avatar Oct 21 '23 02:10 u5surf

@kehoecj

We're not able to use 3rd party services at this time.

Why can't you choose to use these services? It is no risk to publish some sensitive data because it is the OSS production which has already exposed the code on publish. Even if you concerned about the security risk e.g we expose unconsiously somewhat password or credentials, we have better to be protected another processes. Moreover these services are generally free to use in OSS product. I mean that it's quite defacto standerd in OSS to use these SaaS products instead you make and operate the coverage site yourself. Of course, we can make it ourselves, but generally it is not better choice to spend much costs to maintain its coverage site which is different from the essentials of the OSS product.

https://medium.com/@jonjo89/tutorial-getting-started-with-code-coverage-on-your-github-repositories-fd6b1fc7579d#:~:text=1.-,What%20is%20code%20coverage%3F,is%20run%20by%20the%20tests.

I totally hear what you're saying but integration with third-party services needs to be approved by Boeing. Each SaSS service can have different terms and conditions that differ between organizations vs individual OSS projects. I have put in a request to have integration with 3rd party services reviewed and it's working it way through our processes. I don't know how long it will take and given that this project has become more active I wanted to put in place a temporary solution.

kehoecj avatar Oct 23 '23 13:10 kehoecj