Closed lancep888 closed 4 years ago
i just recently bumped into this same issue with similar folder structure and workflow. any solutions yet?
I'm currently having this issue
Ok! I solved this for myself.
I was getting this error because my two applications had files with the same name (i.e. src/config.js
). The test reporter was confused because it thought these were the same file. All I had to do was use the --add-prefix
parameter to let the reporter know they were in different directories.
So, for example, the command in my client
directory went from
npm run test
./cc/cc-test-reporter format-coverage -t lcov -o cc/codeclimate.client.json coverage/lcov.info
to:
npm run test
./cc/cc-test-reporter format-coverage --add-prefix=client -t lcov -o cc/codeclimate.client.json coverage/lcov.info
A description of this flag should probably be added to the docs describing how to the multiple test suite documentation.
@timhaley94 Genius! I added the --add-prefix
flag with the value as the names of each of my function, and I was able to upload the summed up coverage!
I agree the documentation should be updated to reflect this.
- &prepare_test_coverage
run:
name: send test coverage report
command: |
# nyc report requires that nyc has already been run,
# which creates the .nyc_output folder containing necessary data
cd ~/project/$CIRCLE_PROJECT_REPONAME/<< parameters.function_name >>
npm run testcoverage
~/project/tmp/cc-test-reporter format-coverage --add-prefix=<< parameters.function_name >> -t lcov -o ~/project/tmp/codeclimate.<< parameters.function_name >>.json coverage/lcov.info
Hello, I followed the example here: https://github.com/codeclimate/test-reporter/blob/master/examples/multiple_suites.md#example-1 to setup multiple test coverage reports.
ISSUE
When I try the cc-test-reporter sum-coverage, I keep getting a BlobID mismatch error.
my repo's structure is like this:
REPO |- f1 (directory with its own package.json and dependencies) |- f2 (directory with its own package.json and dependencies) |- f3 (directory with its own package.json and dependencies) |- f4 (directory with its own package.json and dependencies) |- f5 (directory with its own package.json and dependencies) |- f6 (directory with its own package.json and dependencies) |- f7 (directory with its own package.json and dependencies)
Workflow:
cc-test-reporter format-coverage
to store the reports intotmp
directorypersist_to_workspace
to store thetmp
directoryupload-coverage
, go to thetmp
directory, where all 7 reports are stored, and try to sum them up, but there's where I get the issue.Some code snippets: