I am in the process of setting up carryforward flags so that I can run only relevant tests in a build.
We have a monorepo, which has several projects, but only two projects are tested, frontend and backend.
I have set up my CI to only run frontend or backend tests if respective files have changed, so only relevant coverage is reported to CodeCov.
Now, for a PR, if only frontend tests are run, I expect that backend test coverage will be carried froward from the last commit of master, but it looks like it’s trying to carry it from the last commit on the branch the PR is on, because of which I am getting 0% coverage from backend flag and hence my PR check is failing.
It’s a private repo, but if it helps to debug, the latest commit SHA on my test branch is
My codecov.yml is as files:
coverage: status: project: default: target: 65% threshold: 0.1% backend: target: 78.92% flags: - backend frontend: target: 54% flags: - frontend flags: backend: paths: - packages/backend/ carryforward: true frontend: paths: - packages/webapp/ carryforward: true
Previosly, I did not have these carry forward flags, and everything was working as expected.