0

I have added a CI using Codecov to ensure that code is sufficiently covered when PR are done in my code.

But the job is still failing after the modifications I made. Here is the full report from codecov, which displays a positive change and no red flags.

There are some parts of the code that are not covered. Still, they correspond to some very specific cases where we never get at usage (except if we are deeply looking to get there, for instance, I manually added a non-printable character somewhere to fall in the condition if not_printable(ch): ....

So my question is actually two questions :

  1. Why does the CI job fail while no red flags appear on the codecov dashboard ?
  2. Is it possible to parameterize the coverage program to pass well ? An idea would be to skip the kind of code lines mentioned above, but I have no idea if it is possible to do it (nor how to do it)
4
  • Have you tried modifying your github actions file to include the flag for --cov-branch ? Commented Jul 22 at 1:04
  • You title question and your actual question at the bottom seem to be different? What kind of help are asking for exactly? Troubleshooting the failure in status reporting or a guidance on coverage testing? Commented Jul 22 at 1:06
  • Yes, you are right, it is unclear. I edited my post to be (I hope) more clear Commented Jul 22 at 6:59
  • I think I understood why it kept failing : it is because in some line of code modified in the PR were not covered (5 or 6 in the whole code, corresponding to the specifi case that will never occur at usage). So I guess I'll just merge the PR with the red cross for the CI failed... Commented Jul 23 at 20:23

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.