diff --git a/.simplecov b/.simplecov index 572aea9..0f6dd9c 100644 --- a/.simplecov +++ b/.simplecov @@ -1,13 +1,10 @@ # frozen_string_literal: true -require 'coveralls' - -SimpleCov.formatter = SimpleCov::Formatter::MultiFormatter.new([ - SimpleCov::Formatter::HTMLFormatter, - Coveralls::SimpleCov::Formatter, -]) - SimpleCov.start 'rails' do + merge_timeout 3600 + + formatter SimpleCov::Formatter::HTMLFormatter + add_group 'Channels', '/app/channels/' add_group 'Interactors', '/app/interactors/' add_group 'Policies', '/app/policies/' diff --git a/.travis.yml b/.travis.yml index dec6ad9..628dca9 100644 --- a/.travis.yml +++ b/.travis.yml @@ -23,3 +23,6 @@ before_script: - psql -U postgres -c "CREATE DATABASE partynest_test;" script: xvfb-run -a bundle exec rake + +after_script: + - bundle exec rake coveralls:push diff --git a/Rakefile b/Rakefile index d665823..0228968 100644 --- a/Rakefile +++ b/Rakefile @@ -13,6 +13,13 @@ task lint: %i[rubocop bundler:audit brakeman] desc 'Fix code style (rubocop --auto-correct)' task fix: 'rubocop:auto_correct' +begin + require 'coveralls/rake/task' + Coveralls::RakeTask.new +rescue LoadError + nil +end + begin require 'rubocop/rake_task' RuboCop::RakeTask.new diff --git a/features/support/env.rb b/features/support/env.rb index 5845fa3..75c9fdd 100644 --- a/features/support/env.rb +++ b/features/support/env.rb @@ -4,6 +4,9 @@ # instead of editing this one. Cucumber will automatically load all features/**/*.rb # files. +# This should be on the top of the file. +require 'simplecov' + require 'cucumber/rails' require 'capybara-screenshot/cucumber'