Do not run Coveralls if secret token is not available (#1137)

This commit is contained in:
anniel-stripe 2022-10-24 14:34:46 -07:00 committed by GitHub
parent 2dec63e6b0
commit 46eca72f79
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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