-
Notifications
You must be signed in to change notification settings - Fork 119
Introducing test coverage report - Closes #49 #50
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
Conversation
This will be provided by SimpleCov gem, on every run will generate a report for the code coverage
14ea1f5
to
ed42a7c
Compare
Also include the CodeClimate badge on the README.md
@@ -9,6 +9,9 @@ | |||
require 'test/unit/testcase' | |||
require 'optparse' | |||
|
|||
require 'simplecov' | |||
SimpleCov.start | |||
|
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.
Can we enable this code only when we run our tests on Travis CI?
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.
Yes, we can use travis ENVs and restrict the execution based on that. I'll push a change for that.
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.
Added the restriction to CI env.
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.
I've updated test reporter ID. |
5609941
to
8f292fc
Compare
Contributors can enable the coverage just setting the ENV variable CI* to a truthy value: Bash compatible ``` CI=true rake ``` Fish ``` ENV CI=true rake ``` * travis CI set this by default on all executions: https://docs.travis-ci.com/user/environment-variables/
@@ -9,6 +9,9 @@ | |||
require 'test/unit/testcase' | |||
require 'optparse' | |||
|
|||
require 'simplecov' | |||
SimpleCov.start | |||
|
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.
I've merged. |
This is part of #49: Proposal: Test coverage report for the project
We must change the CodeClimate TestID:
https://codeclimate.com/github/ruby/csv -> Repo Settings -> Test Coverage -> Test reporter ID
Please use that ID as a code suggestion, and we can merge using ruby/csv token instead of my personal one (on .travis.yml.)