-
Notifications
You must be signed in to change notification settings - Fork 2
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
coverage on CI #16
coverage on CI #16
Conversation
fc6ca92
to
075678b
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hey @gregorw , hello there ! 👋🏼
Federico from CodeClimate here, I just noticed your comment codeclimate/test-reporter#418 (comment) and I decided to inspect what's going on. I left some comments indicating what I believe might be the problem.
discriminable.gemspec
Outdated
@@ -41,5 +41,6 @@ Gem::Specification.new do |spec| | |||
spec.add_development_dependency "minitest", "~> 5.15" | |||
spec.add_development_dependency "rubocop", "~> 1.26" | |||
spec.add_development_dependency "simplecov", "~> 0.21" | |||
spec.add_development_dependency "simplecov_json_formatter", "~> 0.1" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This line shouldn't be necessary, simplecov_json_formatter
is one of simplecov
's 0.21.0
dependencies.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks so much for the feedback. I have removed it again.
test/helper.rb
Outdated
require "simplecov_json_formatter" | ||
SimpleCov.formatter = SimpleCov::Formatter::JSONFormatter if ENV.fetch("CC_TEST_REPORTER_ID", false) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These line shouldn't be necessary either, this behavior is already present on simplecov
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Got it, thanks.
.github/workflows/main.yml
Outdated
|
||
- if: matrix.ruby == 3.1 && matrix.rails == 7 | ||
name: Report coverage | ||
uses: paambaati/codeclimate-action@v3.0.0 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This might be the reason to why your CodeClimate setup is failing. This Github action is not supported by us, it may contain some pitfalls. We recommend using our default tools, see https://docs.codeclimate.com/docs/configuring-test-coverage.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Alright, I got rid of it. Unfortunately, I still cannot make this run. Same error.
ps: I got that gh action from https://docs.codeclimate.com/docs/github-actions-test-coverage
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It runs now, after downgrading simplecov to version 0.17.1 as mentioned here.
5c98a0f
to
ec092cb
Compare
@fede-moya My badge still shows questions marks. Can you see why? I’m merging to see how the coverage badge looks on main brach. |
Oh… it works for the main branch, yay! |
This is pending due to codeclimate/test-reporter#418.
How hard can it be to re-format some json into this?