-
Notifications
You must be signed in to change notification settings - Fork 76
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
format-coverage fails for simplecov 0.21.2 (minitest) with cc-test-reporter 0.10.3 #495
Comments
Looks relevant to #488 to me. |
Thank you for the workaround in #495 (comment) 📝 |
* Add .circleci/config.yml * remove travisci config * update dependencies * update badges * create basic ruby gem publish * use newer ruby version * commit gemfile lock * add codeclimate test coverage * add codeclimate test coverage * json fix for codeclimate test reporter see codeclimate/test-reporter#495
Currently simplecov formatter checks However, apparently simplecov does not output
test-reporter/formatters/simplecov/json_formatter.go Lines 35 to 46 in 22de46a
|
After a further investigation, I found simplecov writes
So another possible workaround would be setting environment variable before testing. CC_TEST_REPORTER_ID=xxx bundle exec rake test |
As I mentioned in codeclimate#495 (comment), `cc-test-reporter format-coverage --input-type=simplecov` needs the test to have run with `CC_TEST_REPORTER_ID` is set, otherwise it parses a coverage file in legacy format that crashes `cc-test-reporter`.
What happens
cc-test-reporter format-coverage
fails with coverage results from SimpleCov 0.21.2 and minitest 5.16.1 as follows:Why
The following results should be handled without any error:
Currently it work well with the following results:
Workaround
jq 'map_values(. | map_values(if type=="object" then map_values(.lines) else . end))' coverage/.resultset.json
helped me work well.Environments
The text was updated successfully, but these errors were encountered: