Skip to content

Commit

Permalink
fix(tests): fix tox config for EOL versions of python
Browse files Browse the repository at this point in the history
  • Loading branch information
dairiki committed Sep 4, 2024
1 parent 96564e8 commit 1eaa75d
Showing 1 changed file with 50 additions and 6 deletions.
56 changes: 50 additions & 6 deletions tox.ini
Original file line number Diff line number Diff line change
@@ -1,19 +1,27 @@
[tox]
minversion = 3.7
minversion = 3.23
envlist =
py27,py36,py37,py38,py39,py310,py311,pypy2,pypy3
py{38,39,310,311}
pypy{38,310}
eol_py{27,36,37,py27}
cover-{clean,report}
lint

labels =
eol = eol_py{27,36,37,py27}

[gh-actions]
python =
2.7: py27
3.6: py36
3.7: py37
3.8: py38
3.9: py39
pypy-2.7: pypy2
pypy-3.7: pypy3
3.10: py310
3.11: py311
pypy-2.7: pypy27
pypy-3.8: pypy38
pypy-3.10: pypy310

[testenv]
deps =
Expand All @@ -24,8 +32,9 @@ commands =
pytest --doctest-modules --doctest-glob=README.md README.md src

depends:
py27,py36,py37,py38,py39,py310,py311,pypy2,pypy3: cover-clean
cover-report: py27,py36,py37,py38,py39,py310,py311,pypy2,pypy3
py{38,39,310,311},pypy{27,38,310}: cover-clean
cover-report: py{38,39,310,311},pypy{27,38,310}


[testenv:cover-clean]
skip_install = true
Expand All @@ -50,6 +59,41 @@ commands =
twine check {envtmpdir}/dist/*
check-manifest

# Old versions of tox & virtualenv are required to test under eol
# versions of python. However, those old versions don't seem to
# consistently work with newer pythons, e.g. pypy310.
#
# So this hack...
[eoltox]
deps =
tox<4
virtualenv<20.22.0
setuptools

[testenv:eol_py27]
skip_install = true
deps = {[eoltox]deps}
commands =
tox -e py27

[testenv:eol_py36]
skip_install = true
deps = {[eoltox]deps}
commands =
tox -e py36

[testenv:eol_py37]
skip_install = true
deps = {[eoltox]deps}
commands =
tox -e py37

[testenv:eol_pypy27]
skip_install = true
deps = {[eoltox]deps}
commands =
tox -e pypy27

[flake8]
# because black
max-line-length = 88
Expand Down

0 comments on commit 1eaa75d

Please sign in to comment.