Closed awentzel closed 3 years ago
hi @efueger, I've tried everything in our repository including now trying with a local batch script. I've resolved the errors above by passing in the required Git environment variables, however still get "failed to read file" when executing against a mono repository. To clarify, a mono-repository, includes many packages each which may have its own coverage configureable in package.json.
The only time I have success is when running within the same package. I'm sure this is a pathing issue, and if you recall above, this used to run just fine until Jest v25.
Directory structure each of which holds packages configured with code coverage in the package.json file.
root/packages/react
root/packages/web-components
root/packages/utilities
root/packages/tooling
Questions:
cc-test-reporter
at the root of the project?--output
back up to the root/coverage folder?Further help is necessary as the documentation doesn't cover this scenario.
Thanks,
Hi @davehenton, you helped me get the first iteration of mono-repository working on Circle CI. We've recently switched to GitHub Actions and having some difficulties getting code reporter to work. Maybe you have some ideas? I've tried what feels like hundreds of different things. I have created a bash script file also to localize and troubleshoot. Any help you can provide would be greatly appreciated. Thanks
@awentzel I was having the same issue so went in and had a look at the source code. I've made a PR and made an example that worked for me. The binary I am using is built on top of the PR I made. Hope this works for you too! https://github.com/wesgur/cc-test-reporter-monorepo-example/blob/master/.github/workflows/app.yml
Hi @awentzel and @wesgur -
Thanks for reaching out and for the PR! I've just added this to the queue for our dev team to review.
Hi @wesgur and @awentzel, apologies that it has taken us this long to get to this issue. I'll copy the response I gave @wesgur in his PR here for reference.
The issue you are referencing here has a root cause not in our test reporter, rather than in the tool used in the express project you built as an example. That tool is not following the lcov standard format which is causing this unexpected behavior. You can see more information about this problem here and here. Unfortunately, this is an ongoing issue in that tool, so I'd suggest using another tool or submitting the issue there. The code in this PR, though it fixes the problem for this particular case, is using the
--prefix
option in the opposite way it's supposed to be used in the rest of the code, which may cause problems for other projects. Besides that, accommodating to a particular tool that has a bug will probably cause more issues.
Let me know if you have questions or comments about this. I'll be closing this issue for now.
Everything has been working great on Linux platforms. First running on Circle CI for two years and recently migrated to GitHub Actions using the same script to execute as recommended for Circle CI. GitHub Actions has been working with this same configuration for 8 weeks, until, Jest was updated.