Skip to content

Make ./scripts/test.sh pass successfully by running under Python 2#321

Merged
auvipy merged 3 commits into
sockjs:mainfrom
jdufresne:py2
May 4, 2026
Merged

Make ./scripts/test.sh pass successfully by running under Python 2#321
auvipy merged 3 commits into
sockjs:mainfrom
jdufresne:py2

Conversation

@jdufresne
Copy link
Copy Markdown
Contributor

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.

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.
@auvipy auvipy requested review from auvipy and Copilot and removed request for Copilot May 4, 2026 06:27
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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-protocol dependency setup + protocol tests inside a python:2.7 Docker container from ./scripts/test.sh.
  • Remove actions/setup-python and virtualenv installation 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.

Comment thread scripts/test.sh
cd sockjs-protocol
./venv/bin/python sockjs-protocol.py
docker run \
--rm \
Comment thread scripts/test.sh Outdated
Comment thread scripts/test.sh
--volume $(pwd):$(pwd) \
--workdir $(pwd)/sockjs-protocol \
--network host \
python:2.7 \
Comment thread scripts/test.sh Outdated
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>
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 thread scripts/test.sh Outdated
Comment thread scripts/test.sh
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 auvipy merged commit 9397cef into sockjs:main May 4, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants