Make ./scripts/test.sh pass successfully by running under Python 2#321
Merged
Conversation
The ./scripts/test.sh script only supports Python 2, but CI was invoking it with Python 3, causing it to fail on every run. This meant CI results did not provide confidence that a given change was sound. This change updates CI to run the test suite using Python 2, which is the only supported version. Once the upstream sockjs-protocol test suite adds Python 3 support, the project can switch back. CI is now green.
There was a problem hiding this comment.
Pull request overview
Updates the test runner and GitHub Actions workflow so the upstream sockjs-protocol test suite is executed under Python 2 (via Docker) instead of being invoked with Python 3 on CI, restoring meaningful green CI runs.
Changes:
- Run
sockjs-protocoldependency setup + protocol tests inside apython:2.7Docker container from./scripts/test.sh. - Remove
actions/setup-pythonandvirtualenvinstallation steps from the Node CI workflow.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 4 comments.
| File | Description |
|---|---|
| scripts/test.sh | Switches protocol test execution to a Python 2 Docker container invocation. |
| .github/workflows/nodejs.yml | Removes Python 3 setup since tests are now handled via Docker in the script. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| cd sockjs-protocol | ||
| ./venv/bin/python sockjs-protocol.py | ||
| docker run \ | ||
| --rm \ |
| --volume $(pwd):$(pwd) \ | ||
| --workdir $(pwd)/sockjs-protocol \ | ||
| --network host \ | ||
| python:2.7 \ |
Comment on lines
+16
to
+17
| --volume $(pwd):$(pwd) \ | ||
| --workdir $(pwd)/sockjs-protocol \ |
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Comment on lines
+19
to
+25
| docker run \ | ||
| --rm \ | ||
| --volume $(pwd):$(pwd) \ | ||
| --workdir $(pwd)/sockjs-protocol \ | ||
| ${DOCKER_NETWORK_ARGS} \ | ||
| python:2.7 \ | ||
| sh -c 'make test_deps pycco_deps && ./venv/bin/python sockjs-protocol.py' |
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
auvipy
approved these changes
May 4, 2026
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.
The ./scripts/test.sh script only supports Python 2, but CI was invoking it with Python 3, causing it to fail on every run. This meant CI results did not provide confidence that a given change was sound.
This change updates CI to run the test suite using Python 2, which is the only supported version. Once the upstream sockjs-protocol test suite adds Python 3 support, the project can switch back.
CI is now green.