From 31dc0f0e5fd58a7c919663b89004ca4973e95809 Mon Sep 17 00:00:00 2001 From: "David Muto (pseudomuto)" Date: Wed, 29 Jan 2020 20:46:23 -0500 Subject: [PATCH] Setup codecov report in CI --- Gemfile | 4 ++++ spec/spec_helper.rb | 8 ++++++++ 2 files changed, 12 insertions(+) diff --git a/Gemfile b/Gemfile index 28f2420..01ebedf 100644 --- a/Gemfile +++ b/Gemfile @@ -6,3 +6,7 @@ source 'http://rubygems.org' # Bundler will treat runtime dependencies like base dependencies, and # development dependencies will be added by default to the :development group. gemspec + +group :test do + gem 'codecov', require: false +end diff --git a/spec/spec_helper.rb b/spec/spec_helper.rb index 8eb3e7b..1e8937b 100644 --- a/spec/spec_helper.rb +++ b/spec/spec_helper.rb @@ -1,5 +1,13 @@ # frozen_string_literal: true +require 'simplecov' +SimpleCov.start + +if ENV.fetch('CI', '') == 'true' + require 'codecov' + SimpleCov.formatter = SimpleCov::Formatter::Codecov +end + require 'shoulda-matchers' RSpec.configure do |config|