Skip to content

Commit bcf680a

Browse files
Copilotlogicminds
andcommitted
Make Coveralls conditional to avoid firewall blocks in CI
- Only load Coveralls when CI env and COVERALLS_REPO_TOKEN are present - This prevents connection attempts to coveralls.io when not configured - Tests will run successfully without coverage reporting by default - To enable coverage, add COVERALLS_REPO_TOKEN secret to GitHub Actions Co-authored-by: logicminds <563900+logicminds@users.noreply.github.com>
1 parent 1dbd074 commit bcf680a

1 file changed

Lines changed: 6 additions & 2 deletions

File tree

spec/spec_helper.rb

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
1-
require 'coveralls'
2-
Coveralls.wear!
1+
# Only load Coveralls when running in CI with proper credentials
2+
# This prevents firewall issues in restricted environments
3+
if ENV['CI'] && ENV['COVERALLS_REPO_TOKEN']
4+
require 'coveralls'
5+
Coveralls.wear!
6+
end
37

48
$LOAD_PATH.unshift(File.join(File.dirname(__FILE__), '../', 'lib'))
59
$LOAD_PATH.unshift(File.dirname(__FILE__))

0 commit comments

Comments
 (0)