Skip to content

Commit

Permalink
Merge pull request #177 from ConorMacBride/upgrade-test-versions
Browse files Browse the repository at this point in the history
Update Python and image versions in tests
  • Loading branch information
ConorMacBride authored Jan 4, 2024
2 parents af274cd + 6cdbb6e commit e68dfda
Show file tree
Hide file tree
Showing 3 changed files with 38 additions and 38 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/test_publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,10 +26,10 @@ jobs:
test_command: pytest --pyargs test_package
targets: |
- linux
- cp38-macosx_x86_64
- cp39-macosx_arm64
- cp311-macosx_x86_64
- cp312-macosx_arm64
- cp3?-win_amd64
- cp39-manylinux_aarch64
- cp312-manylinux_aarch64
timeout-minutes: 30
release_sdist_only:
uses: ./.github/workflows/publish.yml
Expand Down
54 changes: 27 additions & 27 deletions .github/workflows/test_tox.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,17 +17,17 @@ jobs:
uses: ./.github/workflows/tox.yml
with:
envs: |
- linux: py310-inputs-linux
- macos: py39-inputs-macos
- windows: py38-inputs-windows
- linux: py312-inputs-linux
- macos: py311-inputs-macos
- windows: py310-inputs-windows
toxargs: '-v'
runs-on: windows-2019
- linux: py310-inputs-conda
- macos: py310-inputs-conda
- linux: py312-inputs-conda
- macos: py312-inputs-conda
conda: false
posargs: not
- windows: py310-inputs-con_da
- windows: py312-inputs-con_da
conda: true
pytest: false
Expand All @@ -37,18 +37,18 @@ jobs:
with:
conda: 'true'
runs-on: |
linux: ubuntu-18.04
macos: macos-10.15
linux: ubuntu-20.04
macos: macos-11
envs: |
# conda present in toxenv
- linux: py39-inputs-conda
- linux: py39-inputs-conda
- linux: py311-inputs-conda
- linux: py311-inputs-conda
conda: false
posargs: not
# conda not present in toxenv
- linux: py39-inputs-con_da
- linux: py311-inputs-con_da
runs-on: ubuntu-latest
- linux: py39-inputs-con_da
- linux: py311-inputs-con_da
conda: auto
posargs: not
timeout-minutes: 5
Expand All @@ -58,18 +58,18 @@ jobs:
test_default_python:
uses: ./.github/workflows/tox.yml
with:
default_python: '3.7'
default_python: '3.9'
envs: |
- linux: default_python
posargs: '7'
posargs: '9'
- linux: default_python
default_python: '3.10'
posargs: '10'
- linux: py311-python_version
python-version: '3.11-dev'
default_python: '3.12'
posargs: '12'
- linux: py313-python_version
python-version: '3.13-dev'
posargs: 'CPython'
- linux: pypy39-python_version
python-version: 'pypy-3.9'
- linux: pypy310-python_version
python-version: 'pypy-3.10'
posargs: 'PyPy'
pytest: false

Expand Down Expand Up @@ -111,17 +111,17 @@ jobs:
- linux: pep8
name: style_check
pytest: false
- linux: py310
- macos: py39
- windows: py38
- linux: py312
- macos: py311
- windows: py310
test_conda:
uses: ./.github/workflows/tox.yml
with:
envs: |
- linux: py310-conda
- macos: py39-conda
- windows: py38-conda
- linux: py312-conda
- macos: py311-conda
- windows: py310-conda
test_setenv:
uses: ./.github/workflows/tox.yml
Expand Down Expand Up @@ -174,7 +174,7 @@ jobs:
uses: ./.github/workflows/tox.yml
with:
envs: |
- linux: py310-linux
- linux: py312-linux
pytest-results-summary: true
test_prereleases:
Expand Down
16 changes: 8 additions & 8 deletions tox.ini
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
[tox]
envlist =
pep8
py3{8,9,10}
py3{8,9,10}-inputs-{linux,macos,windows,conda,con_da}
py3{10,11,12}
py3{10,11,12}-inputs-{linux,macos,windows,conda,con_da}
default_python
py{,py}3{9,11}-python_version
py{,py}3{10,13}-python_version
libraries
cache-{setup,verify}

Expand All @@ -22,11 +22,11 @@ passenv = MY_VAR
commands =
# Check the python version is as expected
python -c "import sys; assert sys.version_info.major == 3"
py38: python -c "import sys; assert sys.version_info.minor == 8"
py39: python -c "import sys; assert sys.version_info.minor == 9"
pypy39: python -c "import sys; assert sys.version_info.minor == 9"
py310: python -c "import sys; assert sys.version_info.minor == 10"
py311: python -c "import sys; assert sys.version_info.minor == 11"
pypy311: python -c "import sys; assert sys.version_info.minor == 11"
py312: python -c "import sys; assert sys.version_info.minor == 12"
py313: python -c "import sys; assert sys.version_info.minor == 13"
default_python: python -c "import sys; assert sys.version_info.minor == {posargs}"
python_version: python -c "import platform; assert platform.python_implementation() == '{posargs}'"
# Check the OS is as expected
Expand All @@ -38,7 +38,7 @@ commands =
conda,con_da: python -c "import os, sys; assert {posargs} os.path.exists(os.path.join(sys.prefix, 'conda-meta', 'history'))"
# Run a command that should only succeed is the library is installed
libraries: {posargs}
# Verify that setenv is working
# Verify that setenv is working
setenv-global: python -c "import os; assert os.environ['MY_VAR'] == 'global_value'"
setenv-local: python -c "import os; assert os.environ['MY_VAR'] == 'local_value'"
# Verify that caching is working
Expand All @@ -52,7 +52,7 @@ description = verify pep8
deps = flake8
commands = flake8 . --count

[testenv:py3{8,9,10}{,-conda}]
[testenv:py3{10,11,12}{,-conda}]
description = run pytest
skip_install = false
extras = test
Expand Down

0 comments on commit e68dfda

Please sign in to comment.