-
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
cc-test-reporter still broken with SimpleCov #525
Comments
We encountered a similar error using simplecov(0.21.2) + simplecov_json_formatter(0.1.4) + cc-test-reporter. The culprit was this line in our case:
It turned out that what we actually need is the |
@wli0503 thanks for the recommendation, unfortunately it didn't work. this command is still producing the nullType exception
|
Strange. I just ran across this same issue with simplecov 0.22.0 and this did work for me: - ./tmp/cc-test-reporter format-coverage -t simplecov -o tmp/codeclimate.json coverage/.resultset.json
+ ./tmp/cc-test-reporter format-coverage -t simplecov -o tmp/codeclimate.json coverage/coverage.json |
@presidentbeef @wli0503 can you guys share your test setup and run commands so I can compare them with my setup too? |
after more investigation, I don't even have |
@stepchud Sure. For our setup use simplecov and added it to our
We basically follow the guide here: https://github.com/simplecov-ruby/simplecov?tab=readme-ov-file#getting-started |
I misspoke, we do have |
Just to follow up, this can be closed as resolved now. I believe it came down to three changes on my branch:
|
I have a dependabot issue open on my repo to upgrade SimpleCov from 0.17.1 => 0.22.0, which is failing on CircleCI.
The error message I am experiencing is the same issue that was reported in [#413, #418], however none of the suggested solutions are working for me.
I have tried every combination of ways to configure environment in CirceCI, and I have confirmed with
puts
statements that the CC_TEST_REPORTER_ID is available and correct during the build.export CC_TEST_REPORTER_ID=...
as the first line of the command arrayCC_TEST_REPORTER_ID=... bundle exec rspec
I added the gem to my bundle and explicitly set the formatter:
I can also see the formatter for SimpleCov is correct via puts (
SimpleCov::Formatter::JSONFormatter
). I also tried using thesimplecov-json
gem to no avail because it is mentioned on some docs.We have been using a gem called
rspec_junit_formatter
and I tried removing that in case it was causing issues, just trying to remove variables and simplify what might be wrong.Here is the step that's failing in CircleCI:
Just to be clear I am using the actual key, not the ellipses present in this example. CodeClimate states in their documentation that they don't consider CC_TEST_REPORTER_ID to be a secret that needs to be protected but I didn't feel comfortable posting it here anyways. The error message output after the
bundle exec rspec
command:I was initially able to reproduce the error locally. I downloaded
cc-test-reporter
binary for arm64 and have it on my PATH. ExportingCC_TEST_REPORTER_ID
env var worked to fix the output locally, but not on CircleCI. I have tried all of the command line options to cc-test-reporter both locally and on Circle but they're no help. I've spent 2 days trying to get this to work. My last resort will be to try to debug the CircleCI run via SSH since theputs
are not helping.CC: @fede-moya if you are still offering personal assistance I will try to email you directly.
The text was updated successfully, but these errors were encountered: