From 4eb7e38ff847b7aa2c50f08e01410af10deef4a3 Mon Sep 17 00:00:00 2001 From: Annie Li Date: Mon, 24 Oct 2022 14:01:46 -0700 Subject: [PATCH] Do not run Coveralls if secret token is not available --- test/test_helper.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/test_helper.rb b/test/test_helper.rb index 4876b9fba..5e6141f9e 100644 --- a/test/test_helper.rb +++ b/test/test_helper.rb @@ -3,7 +3,7 @@ # Report test coverage to coveralls for only one Ruby version to avoid # repeated builds. This also accounts for coveralls_reborn requiring # RUBY_VERSION >= 2.5. -if RUBY_VERSION.start_with?("3.1.") +if ENV.key?("COVERALLS_REPO_TOKEN") && RUBY_VERSION.start_with?("3.1.") require "coveralls" Coveralls.wear! end