arcus-azure / arcus

Azure development in a breeze
https://arcus-azure.net/
MIT License
22 stars 5 forks source link

Our build pipelines should be extended with code-coverage reports #264

Open fgheysels opened 1 year ago

fgheysels commented 1 year ago

I think it might be helpful that our pipelines also report code coverage. I know we have a lot of tests already, but those code coverage reports would give us insights on which parts of the code-base are not covered by tests, and then we can see and decide if we can live with the fact that a particular set of lines of code is not tested, or if we should add additional tests.

stijnmoreels commented 1 year ago

I agree. We shouldn't be too focused on this, as often integration tests cover the parts that unit tests can't cover and may not show in the results. Any particular tool you have in mind? Codecov? https://about.codecov.io/ https://github.com/codecov/example-csharp

fgheysels commented 1 year ago

I think code-coverage is very helpfull in identifying parts of code that have not been tested, and deciding if we should add a test for it, or not.

The tool I'm mainly using is coverlet. https://learn.microsoft.com/en-us/dotnet/core/testing/unit-testing-code-coverage?tabs=windows

But I'm open for other tools as well.

fgheysels commented 1 year ago

Can we have a status badge or something like that for the code coverage as well, or would that be too much ?

stijnmoreels commented 1 year ago

Can we have a status badge or something like that for the code coverage as well, or would that be too much ?

Oh, yeah, I would like that 😄 !

stijnmoreels commented 1 year ago

Will probably have to do a little GitHub hack to make this work: https://github.com/marketplace/actions/net-code-coverage-badge or https://github.com/marketplace/actions/opencover-badge-generator

Otherwise, I'm thinking of using Codecov instead, as it has more GitHub-default support. https://github.com/marketplace/actions/codecov