Skip to content

Commit 699ca8a

Browse files
GitHub CI/tox: Update CI to use Python 3.11, 3.12 and 3.13
Signed-off-by: Bernhard Kaindl <bernhard.kaindl@cloud.com>
1 parent 4d428f5 commit 699ca8a

3 files changed

Lines changed: 23 additions & 12 deletions

File tree

.github/workflows/main.yml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,10 +28,12 @@ jobs:
2828
fail-fast: false
2929
matrix:
3030
include:
31-
- python-version: '3.10'
32-
os: ubuntu-22.04
3331
- python-version: '3.11'
3432
os: ubuntu-22.04
33+
- python-version: '3.12'
34+
os: ubuntu-22.04
35+
- python-version: '3.13'
36+
os: ubuntu-22.04
3537
runs-on: ${{ matrix.os }}
3638
steps:
3739
- uses: actions/checkout@v4

pyproject.toml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -111,11 +111,12 @@ show_error_context = true
111111
error_summary = true
112112
files = ["xcp", "tests/test_*.py"]
113113
mypy_path = "stubs"
114-
python_version = "3.10"
114+
python_version = "3.11"
115115
warn_redundant_casts = true
116116
warn_return_any = true
117117
warn_unreachable = true
118118
warn_unused_configs = true
119+
explicit_package_bases = true
119120
disallow_any_unimported = true
120121
disallow_any_explicit = false
121122
disallow_any_generics = true
@@ -206,7 +207,7 @@ stubPath = "stubs"
206207
inputs = ["xcp", "tests", "./*.py"]
207208
keepgoing = true
208209
platform = "linux"
209-
python_version = "3.10"
210+
python_version = "3.11"
210211
pythonpath = ".:stubs"
211212
disable = ["ignored-type-comment"]
212213
overriding_parameter_count_checks = true

tox.ini

Lines changed: 16 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,17 @@
11
[tox]
2-
# This is the order how tox runs the tests when used interactively during development.
3-
# Run the tests which uncover issues most often first! For example:
4-
# 1. python 2.7 and 3.10 coverage test for changed, but not covered lines and mypy check
5-
# 2. python 3.6 test and pylint warnings from changed lines
6-
# 3. pytype (needs Python 3.8 for best results)
7-
# 4. pyright checks, pytest test report as markdown for GitHub Actions summary
8-
envlist = py38-covcombine-check, py311-lint-test, py310-pytype, py311-pyright-mdreport
2+
# Set the envlist:
3+
# Defines the environments that tox runs by default (when -e <environment> is not used)
4+
#
5+
# Default order of execution when using `tox` without `-e <environment>`:
6+
#
7+
# 1. pytest using python 3.11 for code coverage with diff-cover and mypy check
8+
# 2. pytype (needs Python 3.10 or newer)
9+
# 3. pylint and pyright checks (any modern Python version is fine)
10+
#
11+
# .github/workflows/main.yml is set up to test with 3.11, 3.12 and 3.13 in parallel.
12+
# Therefore, use three environments: One with 3.11, one with 3.12 and one with 3.13:
13+
#
14+
envlist = py311-covcp-check-mdreport, py312-cov-pytype, py313-cov-lint-pyright
915
isolated_build = true
1016
skip_missing_interpreters = true
1117
requires =
@@ -186,6 +192,8 @@ python =
186192
3.9: py39
187193
3.10: py310
188194
3.11: py311
195+
3.12: py312
196+
3.13: py313
189197

190198
[check]
191199
extras = mypy
@@ -207,7 +215,7 @@ commands =
207215
deps = pytype
208216
pandas
209217
commands =
210-
python3.10 -V # Needs python <= 3.10, and 3.10 is needed to parse new "|" syntax
218+
# Needs python >= 3.10: Needed to parse the newer syntax for "Type2 | Type2"
211219
pytype --version
212220
# Runs pytype -j auto -k --config .github/workflows/pytype.cfg and parses the output:
213221
python3 pytype_runner.py # When switching versions, update .github/workflows/pytype.cfg too!

0 commit comments

Comments
 (0)