Repository navigation
fix codecov upload (closes #381) - #382
Conversation
The codecov action can generate a usable report itself, but it needs the coverage package installed and accessible. This is not the case anymore, since it's now only installed in the hatch test environment. So we generate the report ourselves.
|
Thanks @ilia-kats. We thought that Your solution will certainly work, I'm just wondering if it would be even better to somehow include this in the hatch script definition in |
|
OK so first of all, Ilan and I have seen some issues with letting Then generating the XML isn’t really necessary for any tool we use, so generating it locally would work, but just generate a useless file in the project root for most people. Also it’s only possible to override all of an environment’s scripts at once, so we’d have to add all of this to the config (see defaults): [tool.hatch.envs.hatch-test.scripts]
run = "pytest{env:HATCH_TEST_ARGS:} {args}"
run-cov = "coverage run -m pytest{env:HATCH_TEST_ARGS:} {args}"
cov-combine = [ "coverage combine", "coverage xml" ] # we just want to override this …
cov-report = "coverage report"So running it manually in CI probably best, but we need to be careful not to run into the same issue that So I say we run it using something like |
|
@ilia-kats, can you confirm works for you? |
|
It needs to be |
The codecov action can generate a usable report itself, but it needs the coverage package installed and accessible. This is not the case anymore, since it's now only installed in the hatch test environment. So we generate the report ourselves.