v2ex/remote

Use Codecov to display test coverage automatically

Closed this issue · 4 comments

Maybe we can use Codecov to automatically handle the test coverage.

Use this action to integrate into CI, then we can add a bagde into readme to display test coverage automatically, should I open a PR for this?

livid commented

Currently, coverage badge is generated with this tool:

https://pypi.org/project/coverage-badge/

It is a relatively simple dependency. How about we insert it as a step in CI after pytest step?

So that we do not need to rely on another account. I checked Codecov but I do not have an account yet.

I'd also like to keep simple and independance, coverage-badge is a good choice, of course we can update coverage.svg inside Github Action, but I'm not sure whether it's appropriate to make another commit inside Github Action, such as the code security and submitter.

Another advantage of using Codecov is we can observe change of test coverage of each PR, it will leave a message below each PR to display change of test coverage, I think this is helpful for code review. It can login directly with github account.

Actually, I think it's good too now, I'll not integrate too much external system to most of my projects, but for open source project with multi-person cooperation maybe have a try.

Looks like it's already working. 😝

livid commented

@luxiaba I created an account and merged the PR from @tssujt to make the coverage badge fully automated by Codecov.io.

Thanks for the heads up.