diff --git a/.circleci/config.yml b/.circleci/config.yml index 637de16b..fdfee5b7 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -1,6 +1,8 @@ version: 2.1 orbs: samvera: samvera/circleci-orb@1 + coveralls: coveralls/coveralls@1.0.6 + jobs: build: parameters: @@ -81,9 +83,10 @@ jobs: - store_artifacts: path: coverage - - deploy: - command: | - curl -k https://coveralls.io/webhook?repo_token=$COVERALLS_REPO_TOKEN -d "payload[build_num]=$CIRCLE_BUILD_NUM&payload[status]=done" + - coveralls/upload: + parallel_finished: true + path_to_lcov: /home/circleci/ucrate/coverage/lcov/ucrate.lcov + workflows: version: 2 diff --git a/Gemfile b/Gemfile index 1e3aae6c..44cd9543 100644 --- a/Gemfile +++ b/Gemfile @@ -107,8 +107,10 @@ end group :test do gem 'capybara', '~> 2.4', '< 2.18.0' gem 'capybara-maleficent', '~> 0.2' - gem 'coveralls', '~> 0.8.22', require: false + # gem 'coveralls', '~> 0.8.22', require: false + gem 'coveralls_reborn' gem 'database_cleaner' + gem 'simplecov-lcov', require: false # Keep factory_bot pinned, causes tests to fail if updated (10/2019) gem 'factory_bot_rails', '~> 4.11.1' gem 'rest-client' diff --git a/Gemfile.lock b/Gemfile.lock index 62fc44fb..9d8300ec 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -285,12 +285,11 @@ GEM coffee-script-source (1.12.2) concurrent-ruby (1.1.10) connection_pool (2.2.5) - coveralls (0.8.23) - json (>= 1.8, < 3) - simplecov (~> 0.16.1) - term-ansicolor (~> 1.3) - thor (>= 0.19.4, < 2.0) - tins (~> 1.6) + coveralls_reborn (0.28.0) + simplecov (~> 0.22.0) + term-ansicolor (~> 1.7) + thor (~> 1.2) + tins (~> 1.32) crack (0.4.5) rexml crass (1.0.6) @@ -1051,11 +1050,13 @@ GEM simple_form (5.1.0) actionpack (>= 5.2) activemodel (>= 5.2) - simplecov (0.16.1) + simplecov (0.22.0) docile (~> 1.1) - json (>= 1.8, < 3) - simplecov-html (~> 0.10.0) - simplecov-html (0.10.2) + simplecov-html (~> 0.11) + simplecov_json_formatter (~> 0.1) + simplecov-html (0.12.3) + simplecov-lcov (0.8.0) + simplecov_json_formatter (0.1.4) slop (4.9.2) snaky_hash (2.0.1) hashie @@ -1109,7 +1110,7 @@ GEM thor (1.2.1) thread_safe (0.3.6) tilt (2.0.11) - tins (1.31.1) + tins (1.32.1) sync tinymce-rails (4.9.11) railties (>= 3.1.1) @@ -1189,7 +1190,7 @@ DEPENDENCIES change_manager! clamby coffee-rails (~> 4.2) - coveralls (~> 0.8.22) + coveralls_reborn database_cleaner devise (~> 4.6.0) devise-guests (~> 0.6) @@ -1230,6 +1231,7 @@ DEPENDENCIES show_me_the_cookies sidekiq (~> 5.2.7) sidekiq-limit_fetch + simplecov-lcov solr_wrapper (>= 0.3) sqlite3 (= 1.3.13) turbolinks (~> 5) diff --git a/spec/spec_helper.rb b/spec/spec_helper.rb index 824175bb..f8a85e0a 100644 --- a/spec/spec_helper.rb +++ b/spec/spec_helper.rb @@ -15,7 +15,27 @@ # it. # # See http://rubydoc.info/gems/rspec-core/RSpec/Core/Configuration + +require 'simplecov' +require 'simplecov-lcov' require 'coveralls' + +SimpleCov::Formatter::LcovFormatter.config.report_with_single_file = true +SimpleCov.start 'rails' + +SimpleCov.at_exit do + SimpleCov.formatter = SimpleCov::Formatter::LcovFormatter + SimpleCov.formatter = SimpleCov::Formatter::HTMLFormatter + SimpleCov.formatter = SimpleCov::Formatter::MultiFormatter.new( + [ + SimpleCov::Formatter::HTMLFormatter, + SimpleCov::Formatter::LcovFormatter, + Coveralls::SimpleCov::Formatter + ] + ) + SimpleCov.result.format! +end + Coveralls.wear!('rails') RSpec.configure do |config|