diff --git a/.simplecov b/.simplecov
new file mode 100644
index 0000000000..56fe1a0ea2
--- /dev/null
+++ b/.simplecov
@@ -0,0 +1,6 @@
+SimpleCov.start :rails
+
+if ENV['CI'] == 'true'
+ require 'codecov'
+ SimpleCov.formatter = SimpleCov::Formatter::Codecov
+end
diff --git a/Gemfile b/Gemfile
index 22f8de4874..b2e23b357e 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 c82876936e..dd48334b0c 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/README.md b/README.md
index ff65a463ed..5f20bc5d53 100644
--- a/README.md
+++ b/README.md
@@ -2,6 +2,7 @@
[](https://travis-ci.org/opf/openproject)
[](https://gemnasium.com/opf/openproject)
[![Code Climate](https://codeclimate.com/github/opf/openproject/badges/gpa.svg)](https://codeclimate.com/github/opf/openproject)
+[![codecov.io](http://codecov.io/github/opf/openproject/coverage.svg?branch=release/4.1)](http://codecov.io/github/opf/openproject?branch=release/4.1)
[![Inline docs](http://inch-ci.org/github/opf/openproject.png?branch=dev)](http://inch-ci.org/github/opf/openproject)
[![Gitter](https://badges.gitter.im/Join Chat.svg)](https://gitter.im/opf/openproject?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)
diff --git a/features/support/env.rb b/features/support/env.rb
index 091a91e363..ffb507e985 100644
--- a/features/support/env.rb
+++ b/features/support/env.rb
@@ -33,6 +33,7 @@
# instead of editing this one. Cucumber will automatically load all features/**/*.rb
# files.
+require 'simplecov'
require 'cucumber/rails'
require 'cucumber/rspec/doubles'
require 'capybara-screenshot/cucumber'
diff --git a/spec/spec_helper.rb b/spec/spec_helper.rb
index 26687dfc32..39fb59a499 100644
--- a/spec/spec_helper.rb
+++ b/spec/spec_helper.rb
@@ -27,11 +27,7 @@
#++
require 'rubygems'
-if ENV['CI'] == 'true'
- # we are running on a CI server, report coverage to code climate
- require 'codeclimate-test-reporter'
- CodeClimate::TestReporter.start
-end
+require 'simplecov'
# This file is copied to spec/ when you run 'rails generate rspec:install'
ENV['RAILS_ENV'] ||= 'test'
diff --git a/test/test_helper.rb b/test/test_helper.rb
index f9e662ae4f..c5f56fd328 100644
--- a/test/test_helper.rb
+++ b/test/test_helper.rb
@@ -29,11 +29,7 @@
ENV['RAILS_ENV'] = 'test'
-if ENV['CI'] == 'true'
- # we are running on a CI server, report coverage to code climate
- require 'codeclimate-test-reporter'
- CodeClimate::TestReporter.start
-end
+require 'simplecov'
require File.expand_path('../../config/environment', __FILE__)
require 'rails/test_help'