From 0460a5bf65e3e3d89ea681091781560942d042af Mon Sep 17 00:00:00 2001 From: Russell Keith-Magee Date: Tue, 15 Oct 2024 13:17:10 +0800 Subject: [PATCH] Update CI configuration to reflect new platforms. --- .github/workflows/ci.yml | 37 ++++++++++++++++++++----------------- pyproject.toml | 1 + tox.ini | 20 +++++++++++--------- 3 files changed, 32 insertions(+), 26 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index d79ea6bf5..66b7865f1 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -64,21 +64,19 @@ jobs: strategy: fail-fast: false matrix: - platform: [ "macos-12", "macos-14", "windows-latest", "ubuntu-latest" ] - python-version: [ "3.9", "3.12", "3.13-dev" ] + platform: [ "macos-12", "macos-latest", "windows-latest", "ubuntu-latest" ] + python-version: [ "3.9", "3.13", "3.14" ] include: - experimental: false - - platform: "ubuntu-latest" - python-version: "3.9" - experimental: false + # Ensure the Python versions between min and max are tested - platform: "ubuntu-latest" python-version: "3.10" - experimental: false - platform: "ubuntu-latest" python-version: "3.11" - experimental: false + - platform: "ubuntu-latest" + python-version: "3.12" # Allow dev Python to fail without failing entire job - - python-version: "3.13-dev" + - python-version: "3.14" experimental: true steps: - name: Checkout @@ -90,6 +88,7 @@ jobs: uses: actions/setup-python@v5.2.0 with: python-version: ${{ matrix.python-version }} + allow-prereleases: true - name: Get Packages uses: actions/download-artifact@v4.1.8 @@ -185,23 +184,27 @@ jobs: fail-fast: false matrix: framework: [ "toga", "pyside6", "pygame", "console" ] - runner-os: [ "macos-12", "macos-14", "ubuntu-22.04", "windows-latest" ] + runner-os: [ "macos-13", "macos-latest", "ubuntu-latest", "windows-latest" ] verify-apps: name: Build app needs: [ package, package-automation, unit-tests ] - uses: beeware/.github/.github/workflows/app-build-verify.yml@main + # TODO: Revert to main when .github#172 is merged + uses: beeware/.github/.github/workflows/app-build-verify.yml@599f2fbb61c17aa94a962f26647f31a879a31052 with: - # This *must* be the version of Python that is the system Python on the - # Ubuntu version used to run Linux tests. We use a fixed ubuntu-22.04 - # rather than `-latest` because at some point, `-latest` will become - # `-24.04`, but it will be a soft changeover, which will cause havoc with - # the hard Python version requirement for local system packages. - python-version: "3.10" + python-version: ${{ matrix.python-version }} runner-os: ${{ matrix.runner-os }} framework: ${{ matrix.framework }} strategy: fail-fast: false matrix: framework: [ "toga", "pyside6", "pygame", "console" ] - runner-os: [ "macos-12", "macos-14", "ubuntu-22.04", "windows-latest" ] + runner-os: [ "macos-13", "macos-latest", "ubuntu-latest", "windows-latest" ] + + includes: + # A version of Python that is supported by all the GUI toolkits. + - python-version: "3.12" + + # We need to use the system Python on Ubuntu + - runner-os: ubuntu-latest + python-version: system diff --git a/pyproject.toml b/pyproject.toml index 35c77a7a0..bf8e077dd 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -53,6 +53,7 @@ classifiers = [ "Programming Language :: Python :: 3.11", "Programming Language :: Python :: 3.12", "Programming Language :: Python :: 3.13", + "Programming Language :: Python :: 3.14", "Programming Language :: Python :: 3 :: Only", "Topic :: Software Development", "Topic :: Utilities", diff --git a/tox.ini b/tox.ini index a620fc3cd..220b517a5 100644 --- a/tox.ini +++ b/tox.ini @@ -16,17 +16,18 @@ extend-ignore = E203, [tox] -envlist = towncrier-check,docs-lint,pre-commit,py{39,310,311,312,313}-cov,coverage +envlist = towncrier-check,docs-lint,pre-commit,py{39,310,311,312,313,314}-cov,coverage labels = - test = py{39,310,311,312,313}-cov,coverage + test = py{39,310,311,312,313,314}-cov,coverage test39 = py39-cov,coverage39 test310 = py310-cov,coverage310 test311 = py311-cov,coverage311 test312 = py312-cov,coverage312 test313 = py313-cov,coverage313 - test-fast = py{39,310,311,312,313}-fast - test-platform = py{39,310,311,312,313}-cov,coverage-platform - ci = towncrier-check,docs-lint,pre-commit,py{39,310,311,312,313}-cov,coverage-platform + test314 = py314-cov,coverage314 + test-fast = py{39,310,311,312,313,314}-fast + test-platform = py{39,310,311,312,313,314}-cov,coverage-platform + ci = towncrier-check,docs-lint,pre-commit,py{39,310,311,312,313,314}-cov,coverage-platform skip_missing_interpreters = True [testenv:pre-commit] @@ -35,7 +36,7 @@ wheel_build_env = .pkg extras = dev commands = pre-commit run --all-files --show-diff-on-failure --color=always -[testenv:py{,39,310,311,312,313}{,-fast,-cov}] +[testenv:py{,39,310,311,312,313,314}{,-fast,-cov}] package = wheel wheel_build_env = .pkg depends: pre-commit @@ -49,19 +50,20 @@ commands = cov : python -X warn_default_encoding -m coverage run -m pytest {posargs:-vv --color yes} fast : python -m pytest {posargs:-vv --color yes -n auto} -[testenv:coverage{,39,310,311,312,313}{,-ci}{,-platform,-platform-linux,-platform-macos,-platform-windows,-project}{,-keep}{,-html}] +[testenv:coverage{,39,310,311,312,313,314}{,-ci}{,-platform,-platform-linux,-platform-macos,-platform-windows,-project}{,-keep}{,-html}] package = wheel wheel_build_env = .pkg -depends = pre-commit,py{,39,310,311,312,313}{,-cov} +depends = pre-commit,py{,39,310,311,312,313,314}{,-cov} # by default, coverage should run on oldest supported Python for testing platform coverage. # however, coverage for a particular Python version should match the version used for pytest. base_python = - coverage: py39,py310,py311,py312,py313 + coverage: py39,py310,py311,py312,py313,py314 coverage39: py39 coverage310: py310 coverage311: py311 coverage312: py312 coverage313: py313 + coverage314: py314 passenv = COVERAGE_FILE setenv = keep: COMBINE_FLAGS = --keep