Make Coveralls conditional to prevent firewall blocks in restricted CI environments#82
Merged
Merged
Conversation
- 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>
Copilot
AI
changed the title
[WIP] Fix firewall settings for GitHub Actions to connect to Coveralls
Make Coveralls conditional to prevent firewall blocks in restricted CI environments
Feb 6, 2026
There was a problem hiding this comment.
Pull request overview
This pull request modifies the test suite to make Coveralls code coverage reporting conditional based on environment variables, preventing firewall connection issues in restricted CI environments.
Changes:
- Guard Coveralls initialization with
ENV['CI'] && ENV['COVERALLS_REPO_TOKEN']check to prevent unconditional connection attempts to coveralls.io
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
GitHub Actions in restricted network environments cannot reach coveralls.io. The test suite unconditionally loads Coveralls on every run, causing connection attempts that hit firewall blocks.
Changes
spec/spec_helper.rb: Guard Coveralls initialization with environment checksBehavior
COVERALLS_REPO_TOKENsecret is configuredCIenvironment variable already set by GitHub ActionsEnabling Coverage (Optional)
Add
COVERALLS_REPO_TOKENrepository secret with Coveralls API token. No workflow changes required.💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.