Skip to content
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

Merged
merged 14 commits into from
Apr 7, 2022
Merged

coverage on CI #16

merged 14 commits into from
Apr 7, 2022

Conversation

gregorw
Copy link
Owner

@gregorw gregorw commented Apr 4, 2022

This is pending due to codeclimate/test-reporter#418.

How hard can it be to re-format some json into this?

@gregorw gregorw force-pushed the coverage branch 8 times, most recently from fc6ca92 to 075678b Compare April 6, 2022 23:18
@gregorw gregorw marked this pull request as draft April 6, 2022 23:20
Copy link

@f-moya f-moya left a 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.

@@ -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"
Copy link

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.

Copy link
Owner Author

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
Comment on lines 4 to 5
require "simplecov_json_formatter"
SimpleCov.formatter = SimpleCov::Formatter::JSONFormatter if ENV.fetch("CC_TEST_REPORTER_ID", false)
Copy link

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.

Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Got it, thanks.


- if: matrix.ruby == 3.1 && matrix.rails == 7
name: Report coverage
uses: paambaati/codeclimate-action@v3.0.0
Copy link

@f-moya f-moya Apr 7, 2022

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.

Copy link
Owner Author

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

Copy link
Owner Author

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.

@gregorw gregorw force-pushed the coverage branch 4 times, most recently from 5c98a0f to ec092cb Compare April 7, 2022 20:14
@gregorw
Copy link
Owner Author

gregorw commented Apr 7, 2022

@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.

@gregorw gregorw marked this pull request as ready for review April 7, 2022 20:23
@gregorw gregorw merged commit eff3573 into main Apr 7, 2022
@gregorw gregorw deleted the coverage branch April 7, 2022 20:23
@gregorw
Copy link
Owner Author

gregorw commented Apr 7, 2022

Oh… it works for the main branch, yay!

gregorw added a commit that referenced this pull request Apr 15, 2022
gregorw added a commit that referenced this pull request Apr 15, 2022
gregorw added a commit that referenced this pull request Apr 15, 2022
gregorw added a commit that referenced this pull request Apr 15, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants