From 2f98bb6ff64bd5c598eb1226d70b955b1d57d0d7 Mon Sep 17 00:00:00 2001 From: Alex Coles Date: Thu, 14 May 2015 19:32:09 +0200 Subject: [PATCH] Switch code coverage reporting to codecov.io Codecov supports merging of coverage data from multiple builds: https://github.com/codeclimate/ruby-test-reporter/issues/49 Signed-off-by: Alex Coles --- Gemfile | 2 +- Gemfile.lock | 9 ++++++--- spec/spec_helper.rb | 8 +++++--- test/test_helper.rb | 8 +++++--- 4 files changed, 17 insertions(+), 10 deletions(-) diff --git a/Gemfile b/Gemfile index 22f8de48740a..b2e23b357e0c 100644 --- a/Gemfile +++ b/Gemfile @@ -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 diff --git a/Gemfile.lock b/Gemfile.lock index c82876936e7e..dd48334b0ca9 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -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) @@ -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) @@ -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) diff --git a/spec/spec_helper.rb b/spec/spec_helper.rb index 26687dfc32cc..918a7fe0c7cb 100644 --- a/spec/spec_helper.rb +++ b/spec/spec_helper.rb @@ -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' diff --git a/test/test_helper.rb b/test/test_helper.rb index f9e662ae4f70..0cc9ab4151ed 100644 --- a/test/test_helper.rb +++ b/test/test_helper.rb @@ -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__)