From 0e0cb7dbae4f8e0c47d160e0efee5a10e6f8e9a1 Mon Sep 17 00:00:00 2001 From: Holger Just Date: Fri, 17 Jul 2020 15:41:16 +0200 Subject: [PATCH] Use a more generic detection of a CI environment for coveralls in specs --- .travis.yml | 2 +- spec/spec_helper.rb | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/.travis.yml b/.travis.yml index a23fd92..6701b35 100644 --- a/.travis.yml +++ b/.travis.yml @@ -12,7 +12,7 @@ matrix: include: # Latest Rubies on top - rvm: 2.7.1 - env: COVERAGE=1 + env: COVERAGE=true - rvm: jruby-9.2.12.0 - rvm: truffleruby-20.1.0 diff --git a/spec/spec_helper.rb b/spec/spec_helper.rb index 878eb13..dad04b4 100644 --- a/spec/spec_helper.rb +++ b/spec/spec_helper.rb @@ -5,11 +5,11 @@ # This software may be modified and distributed under the terms # of the MIT license. See the LICENSE.txt file for details. -if ENV['COVERAGE'] +if ENV['COVERAGE'].to_s == 'true' require 'simplecov' - require 'coveralls' - if ENV['TRAVIS'] + if ENV['CI'] == 'true' + require 'coveralls' SimpleCov.formatter = SimpleCov::Formatter::MultiFormatter[ SimpleCov::Formatter::HTMLFormatter, Coveralls::SimpleCov::Formatter