Upload coverage report from main
directly
#125
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
While thinking about how to work with Codecov and the
squash & merge
workflow, I now believe the following workflow should work:override_branch: main
so that the commit also seems to belong tomain
Subsequent PRs should then be able to find the reports (but see here for a caveat) and compare to them successfully.
So the first commit on this PR sets up the double uploading. Unfortunately, while thinking about this a bit more, I understood that this workflow won't work for PRs with revisions, so to speak: when the tests run once on a PR and upload its coverage, that coverage would be assumed to be valid for
main
, too. If you then need to improve your code later one and run the checks again, it would be run against the previously last commit of this PR, essentially rendering thepatch
checks (usually indicating coverage changes by this PR) meaningless.Thus, the second commit simply enables the whole workflow on PRs as well as pushes to
main
, which wastes some computational resources, but seems to be the easiest way on our side.I'll leave a note, however, to watch the issue linked above and revise our workflow once a better one becomes available.
On that note, why are we running the
build-docs
workflow on PRs and pushes tomain
(or at all, since we also let RTD build the docs for every PR)? Our own workflow is slightly faster than RTD, but the pages are not rendered as nicely.