diff --git a/.simplecov b/.simplecov index 9311070..6a3cc52 100644 --- a/.simplecov +++ b/.simplecov @@ -1,6 +1,7 @@ # frozen_string_literal: true -SimpleCov.start do - add_filter '/spec/' - add_group 'Lib', 'lib/' - formatter SimpleCov::Formatter::HTMLFormatter unless ENV['TRAVIS'] +unless defined?(RUBY_ENGINE) && %w(rbx jruby).include?(RUBY_ENGINE) + SimpleCov.start do + add_filter '/spec/' + formatter SimpleCov::Formatter::HTMLFormatter unless ENV['TRAVIS'] + end end diff --git a/.travis.yml b/.travis.yml index a36ecfe..ae3978b 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,14 +1,20 @@ -dist: trusty -sudo: required +dist: xenial +sudo: false language: ruby rvm: -# The latest ruby that is pre-installed on Travis Trusty -- 2.3.1 +- 2.3.8 env: global: - TRAVIS=1 CI=1 COVERAGE=1 cache: bundler bundler_args: --without debug -# Avoid rake here, as the RSpec test task spawns a new process which does not run via bundler. -script: "bundle exec rspec --format d && bundle exec rubocop && bundle exec codeclimate-test-reporter" +before_script: +- curl -L https://codeclimate.com/downloads/test-reporter/test-reporter-latest-linux-amd64 > ./cc-test-reporter +- chmod +x ./cc-test-reporter +- ./cc-test-reporter before-build +script: +- bundle exec rspec --format d +- bundle exec rubocop +after_script: +- ./cc-test-reporter after-build --exit-code $TRAVIS_TEST_RESULT diff --git a/Gemfile b/Gemfile index e5829bf..4c643ad 100644 --- a/Gemfile +++ b/Gemfile @@ -6,10 +6,3 @@ source 'https://rubygems.org' gemspec gem 'thredded', '>= 0.8.0', '< 1.0', git: 'https://github.com/thredded/thredded' - -if ENV['CI'] - group :test do - # CodeClimate coverage reporting. - gem 'codeclimate-test-reporter', require: false - end -end