Skip to content

Pin CI unit tests to Python 3.12 in tests.yml - #181

Merged
yhong123 merged 4 commits into
mainfrom
yhong123/175-ci_python_version
Nov 20, 2026
Merged

yhong123 merged 4 commits into
mainfrom
yhong123/175-ci_python_version

Conversation

@yhong123

@yhong123 yhong123 commented Nov 20, 2026 •

Copy link
Copy Markdown
Collaborator

Part of #175

The unit test workflow already set PYTHON_VERSION: "3.10" in env, but no step used it. Tests ran on whatever Python the ubuntu-latest runner image ships, which changes when GitHub updates the image.

This PR adds an actions/setup-python@v6 step that installs ${{ env.PYTHON_VERSION }}. CI now runs on Python 3.10, the lowest version pyproject.toml supports (python = ">=3.10,<3.14").

This is a first step. Support for Python 3.14 (or newer) will come in a separate PR.

- name: Set up Python
uses: actions/setup-python@v6
with:
python-version: ${{ env.PYTHON_VERSION }}

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Should we just fold this in? as in python-version: 3.12? If you think it's better as it is then that's fine.

- name: Set up Python
uses: actions/setup-python@v6
with:
python-version: ${{ env.PYTHON_VERSION }}

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Also, aren't we trying to pin to 3.10?

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

The original tests.ymlalready defines PYTHON_VERSION: "3.10" on lines 9-11. I simply wired actions/setup-python@v6 up to that existing variable, so the PR explicitly pins CI to the version we were already targeting. If we'd prefer to move to 3.12 instead, I can update the PR accordingly. Shall we try 3.12 ? @tim-band

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

I have tested with PYTHON_VERSION: "3.12" in tests.yml and got CI green.
@tim-band would you prefer to move to 3.12 or stick with 3.10?

@yhong123
yhong123 merged commit bf9197f into main Nov 20, 2026
3 checks passed
@yhong123 yhong123 changed the title Pin CI unit tests to Python 3.10 in tests.yml Pin CI unit tests to Python 3.12 in tests.yml Nov 20, 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