Codecov keep unmodified data

30 views Asked by At

I have this situation of a GitHub repo with two projects in it (each one is in a separate folder).

There are two workflows that run unit tests of the corresponding specific project only, and upload their results to the codecov page of the repo. If only one project is modified, only the corresponding workflow is executed, and if both projects are modified, then all workflows are executed. I'm using pytest with pytest-cov plugin to test and generate code coverage.

Everything works fine except for when I only do some changes in one of the projects. If I modify both, I can see in the codecov page the overall coverage of the whole repo (like of the two projects). But if I modify only (say, the first project) and only its workflow is executed, then the code coverage data of the other project disappears from codecov.

I would like to tell codecov to keep the data from the second project, since it hasn't been modified and is completely independent from the first one. There's no effect on its code coverage data at all.

I can somehow understand this behaviour, since codecov works like a version control of code coverage, and if in a previous commit/version both tests were executed it will still display bohts results from that commit/version, but if in the newest version if only a single test was executed then only that one's info will be displayed.

In summary, I would like to config codecov to tell it like "hey, even though the tests of the second repo haven't been executed, keep them on display since they are still valid".

PD: I also looked in the possibility of storing the results of the second repo in a GitHub artifact, but I intend to manage the possibility of not tesing the second repo for a very long time, and GitHub artifact only lasts 90 days as maximum in a public repo (which is the case).

0

There are 0 answers