I changed no code files, and nothing was merged into master between when I branched off of it and when I opened the PR, so I expected no coverage changes. However, Codecov still reports a change in coverage, and the default codecov/project check fails as a result, with default settings.
I found this behavior unexpected and surprising, and couldn’t explain it based on anything I found in the docs or in this forum — apologies if I missed something well-known and obvious.
I also have encountered same kind of problem in my PR for other repo here.
I didn’t change the code but the coverage here is changed from master to my PR.
Here is the diff between the PR’s commit and the base commit it is comparing to:
$ git checkout codecov_config
Branch 'codecov_config' set up to track remote branch 'codecov_config' from 'origin'.
Switched to a new branch 'codecov_config'
$ git diff 0cf5414
diff --git a/codecov.yml b/codecov.yml
new file mode 100644
index 0000000..dfc0998
--- /dev/null
+++ b/codecov.yml
@@ -0,0 +1,7 @@
+coverage:
+ status:
+ patch:
+ default:
+ target: auto
+ threshold: 0.03%
+ base: auto
If I understood your message correctly, it would mean that the best explanation given the available evidence (change in coverage but no change in code) is that the test suite is in some way non-deterministic. Would you agree?
If my interpretation above is correct, I am happy to take a look at this with my team — while our tests are do not have any unintentional non-determinism, it’s always possible some has snuck in anyway.
Thanks again for your time, and thank you for working on this awesome tool
We were able to confirm nondeterminism in our tests. We are still investigating where that nondeterminism comes from. However, we were able to confirm that codecov is not the source of the problem.
Hey @obi1kenobi , Jerrod from Codecov here, did you all ever find the root cause of the non-determinism in the test results? I’d be really curious to hear.
I understand that checking for non-determinism may still be a good idea but perhaps Codecov could filter-out unchanged files from the report and print a warning instead saying the test suite looks non-deterministic? It’d make it easier for reviewers to see that the contributor is not lazy.
Sorry for reviving an old discussion but it appears this issue is still present. Since the codecov/project and codecov/patch actions suddenly appeared today we have had two failures with the same -0.03% change in coverage with no file changes being shown in the report.