From a2374039ef889e0555c2986c5bd49179922b0f8b Mon Sep 17 00:00:00 2001 From: Mike Perham Date: Fri, 19 Jun 2020 17:10:01 -0700 Subject: [PATCH] Integrate codecov --- .circleci/config.yml | 2 +- Gemfile | 4 ++-- Gemfile.lock | 11 ++++++++++- test/helper.rb | 4 ++++ 4 files changed, 17 insertions(+), 4 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 8c071733..70825d43 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -3,7 +3,7 @@ references: unit: &unit run: name: Run test suite - command: bundle exec rake + command: bundle exec rake COVERAGE=1 restore: &restore restore_cache: keys: diff --git a/Gemfile b/Gemfile index 1f1e3913..b7987103 100644 --- a/Gemfile +++ b/Gemfile @@ -10,8 +10,8 @@ gem "activerecord-jdbcsqlite3-adapter", platforms: :jruby group :test do gem "minitest" - # https://github.com/codeclimate/test-reporter/issues/413 - gem "simplecov", "~> 0.17.1" + gem "simplecov" + gem 'codecov', require: false end group :development, :test do diff --git a/Gemfile.lock b/Gemfile.lock index a04c669a..5b607992 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -71,6 +71,10 @@ GEM zeitwerk (~> 2.2, >= 2.2.2) ast (2.4.1) builder (3.2.4) + codecov (0.1.17) + json + simplecov + url concurrent-ruby (1.1.6) connection_pool (2.2.3) crass (1.0.6) @@ -178,6 +182,7 @@ GEM tzinfo (1.2.7) thread_safe (~> 0.1) unicode-display_width (1.7.0) + url (0.3.2) websocket-driver (0.7.2) websocket-extensions (>= 0.1.0) websocket-driver (0.7.2-java) @@ -191,13 +196,17 @@ PLATFORMS DEPENDENCIES activerecord-jdbcsqlite3-adapter + codecov hiredis minitest rails (>= 6.0.2) rake redis-namespace sidekiq! - simplecov (~> 0.17.1) + simplecov sqlite3 standard toxiproxy + +BUNDLED WITH + 2.1.4 diff --git a/test/helper.rb b/test/helper.rb index 22afba2a..eadd5c62 100644 --- a/test/helper.rb +++ b/test/helper.rb @@ -19,6 +19,10 @@ if ENV["COVERAGE"] add_filter "/test/" add_filter "/myapp/" end + if ENV['CI'] + require 'codecov' + SimpleCov.formatter = SimpleCov::Formatter::Codecov + end end ENV['REDIS_URL'] ||= 'redis://localhost/15'