You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We have recently updated our CI workflow to use sharding in Jest to speed up the tests. The flow is something like this:
Job 1: Checkout, install and build.
Then job 2 and 3 in parallel: checkout, install and run tests. Each job runs 50% of the tests. Coverage then gets uploaded as an artifact via actions/upload-artifact.
Job 4: download coverage with actions/download-artifact, merge into a single json and report to Codecov via codecov/codecov-action.
The problem was that job 4 didn't checkout the repo (because it didn't really need those files).
When codecov-action was used without the repo being present, even though the coverage file was uploaded, it always said All modified and coverable lines are covered by tests ✅ and all changes were reported as indirect changes.
File paths were incorrect (extra webui) and clicking on the file resulted in an error:
You can see my previous CI configuration and fixes in the associated PR. There were no important changes in how coverage file is generated.
While this is a configuration error, I feel like there could be something to improve on Codecov's end:
It could have given me an error on upload if it really needed files to be present.
We have patch coverage target set up. It would have been better if it started failing on all jobs. Instead it was always green for a month, before we spotted that something was wrong.
The text was updated successfully, but these errors were encountered:
We have recently updated our CI workflow to use sharding in Jest to speed up the tests. The flow is something like this:
actions/upload-artifact
.actions/download-artifact
, merge into a single json and report to Codecov viacodecov/codecov-action
.The problem was that job 4 didn't checkout the repo (because it didn't really need those files).
When
codecov-action
was used without the repo being present, even though the coverage file was uploaded, it always saidAll modified and coverable lines are covered by tests ✅
and all changes were reported as indirect changes.File paths were incorrect (extra
webui
) and clicking on the file resulted in an error:2024-11-29.10.45.32.mov
Example of a bad job:
https://github.com/truenas/webui/actions/runs/12073223216/job/33669795147?pr=11114
After I added repo checkout as a step, everything started to work correctly:
https://github.com/truenas/webui/actions/runs/12082374244/job/33694460349?pr=11114
You can see my previous CI configuration and fixes in the associated PR. There were no important changes in how coverage file is generated.
While this is a configuration error, I feel like there could be something to improve on Codecov's end:
The text was updated successfully, but these errors were encountered: