Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 7 additions & 1 deletion .github/workflows/publish-to-pypi.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,16 @@ jobs:

steps:
- uses: actions/checkout@v3
# Every interpreter in the tox.ini envlist must exist or tox cannot create
# that environment. The *last* entry becomes the default `python`, so keep
# 3.11 last: `uv python pin 3.11` and `make build` below are unaffected.
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: "3.11"
python-version: |
3.9
3.10
3.11

- name: Install pypa/build
run: |
Expand Down
17 changes: 15 additions & 2 deletions .github/workflows/unit-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,16 @@ jobs:
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- uses: actions/checkout@v3

# Set up python 3.9
# Set up every interpreter in the tox.ini envlist. The *last* entry becomes
# the default `python`, so keep 3.9 last: `make test` stays on the
# requires-python = ">=3.9" floor, and only tox reaches for 3.10/3.11.
- name: Prepare python env
uses: actions/setup-python@v4
with:
python-version: "3.9"
python-version: |
3.11
3.10
3.9

# Install uv
- name: Install uv
Expand All @@ -24,3 +29,11 @@ jobs:
# Pack and publish Python SDK
- name: Exec py client unit test
run: make test

# Exercise tox on every PR instead of only at release time.
# tox >= 4.31 requires Python >= 3.10, so install it with 3.11 to resolve
# the same tox release the publish workflow uses.
- name: Install tox
run: python3.11 -m pip install tox
- name: Run tox
run: python3.11 -m tox
6 changes: 6 additions & 0 deletions tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,12 @@
[tox]
envlist = py{39,310,311}

# Fail loudly when an interpreter in envlist is missing instead of silently
# skipping that environment. tox <= 4.30 skips by default, tox >= 4.31 fails,
# so pin the behaviour explicitly to keep CI results identical regardless of
# which tox version the runner resolves.
skip_missing_interpreters = false

# Define the minimal tox version required to run;
# if the host tox is less than this the tool with create an environment and
# provision it with a tox that satisfies it under provision_tox_env.
Expand Down
Loading