Skip to content

Commit

Permalink
Switch code coverage reporting to codecov.io
Browse files Browse the repository at this point in the history
Codecov supports merging of coverage data from multiple builds:
codeclimate/ruby-test-reporter#49

Signed-off-by: Alex Coles <alex@alexbcoles.com>
  • Loading branch information
myabc committed May 14, 2015
1 parent 0479314 commit 2f98bb6
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 10 deletions.
2 changes: 1 addition & 1 deletion Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -166,7 +166,7 @@ group :test do
gem "shoulda-matchers", '~> 2.5.0'
gem "json_spec"
gem "activerecord-tableless", "~> 1.0"
gem "codeclimate-test-reporter", :require => nil
gem 'codecov', require: nil
gem 'equivalent-xml', '~> 0.5.1'
end

Expand Down
9 changes: 6 additions & 3 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -138,8 +138,10 @@ GEM
activesupport (>= 3.0)
cocaine (0.5.4)
climate_control (>= 0.0.3, < 1.0)
codeclimate-test-reporter (0.1.1)
simplecov (>= 0.7.1, < 1.0.0)
codecov (0.0.6)
json
simplecov
url
coderay (1.0.9)
coercible (1.0.0)
descendants_tracker (~> 0.0.1)
Expand Down Expand Up @@ -456,6 +458,7 @@ GEM
kgio (~> 2.6)
rack
raindrops (~> 0.7)
url (0.3.2)
virtus (1.0.4)
axiom-types (~> 0.1)
coercible (~> 1.0)
Expand Down Expand Up @@ -484,7 +487,7 @@ DEPENDENCIES
capybara-select2!
carrierwave (~> 0.10.0)
cocaine
codeclimate-test-reporter
codecov
coderay (~> 1.0.9)
color-tools (~> 1.3.0)
cucumber-rails (~> 1.4.2)
Expand Down
8 changes: 5 additions & 3 deletions spec/spec_helper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -27,10 +27,12 @@
#++

require 'rubygems'
require 'simplecov'
SimpleCov.start

if ENV['CI'] == 'true'
# we are running on a CI server, report coverage to code climate
require 'codeclimate-test-reporter'
CodeClimate::TestReporter.start
require 'codecov'
SimpleCov.formatter = SimpleCov::Formatter::Codecov
end

# This file is copied to spec/ when you run 'rails generate rspec:install'
Expand Down
8 changes: 5 additions & 3 deletions test/test_helper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -29,10 +29,12 @@

ENV['RAILS_ENV'] = 'test'

require 'simplecov'
SimpleCov.start

if ENV['CI'] == 'true'
# we are running on a CI server, report coverage to code climate
require 'codeclimate-test-reporter'
CodeClimate::TestReporter.start
require 'codecov'
SimpleCov.formatter = SimpleCov::Formatter::Codecov
end

require File.expand_path('../../config/environment', __FILE__)
Expand Down

0 comments on commit 2f98bb6

Please sign in to comment.