Skip to content

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

Merged
merged 4 commits into from
Nov 16, 2018

Conversation

esparta
Copy link
Contributor

@esparta esparta commented Nov 16, 2018

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

This will be provided by SimpleCov gem, on every run
will generate a report for the code coverage
@esparta esparta force-pushed the introducing_test_coverage_report branch from 14ea1f5 to ed42a7c Compare November 16, 2018 03:18
Also include the CodeClimate badge on the README.md
@@ -9,6 +9,9 @@
require 'test/unit/testcase'
require 'optparse'

require 'simplecov'
SimpleCov.start

Copy link
Member

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?

Copy link
Contributor Author

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.

Copy link
Contributor Author

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.

Copy link
Member

Choose a reason for hiding this comment

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

Thanks.

@kou
Copy link
Member

kou commented Nov 16, 2018

I've updated test reporter ID.

@esparta esparta force-pushed the introducing_test_coverage_report branch from 5609941 to 8f292fc Compare November 16, 2018 04:24
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

Copy link
Member

Choose a reason for hiding this comment

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

Thanks.

@kou kou merged commit 710fb39 into ruby:master Nov 16, 2018
@kou
Copy link
Member

kou commented Nov 16, 2018

I've merged.

@esparta esparta deleted the introducing_test_coverage_report branch November 16, 2018 05:11
@esparta
Copy link
Contributor Author

esparta commented Nov 16, 2018

Thanks @kou & @hsbt !

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