Skip to content

Commit 6449a9d

Browse files
committed
Fix tox configuration
Use more recent Python versions and remove use of the build_sphinx distutils command which hasn't existed for many years now. Signed-off-by: Stephen Finucane <[email protected]>
1 parent 8a8ec14 commit 6449a9d

File tree

2 files changed

+27
-16
lines changed

2 files changed

+27
-16
lines changed

tox.ini

Lines changed: 27 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,26 +1,37 @@
11
[tox]
22
envlist =
3-
py3{6,7,8,9}
4-
py3{6,7,8,9}-functional
3+
py3{10,11,12,13}{,-functional}
4+
coverage
55

66
[testenv]
7-
passenv = TOXENV,CI,TRAVIS,TRAVIS_*
8-
usedevelop = True
9-
install_command = pip install -U {opts} {packages}
10-
deps = -r{toxinidir}/test-requirements.txt
11-
-r{toxinidir}/requirements.txt
7+
use_develop = true
8+
deps =
9+
-r{toxinidir}/test-requirements.txt
10+
-r{toxinidir}/requirements.txt
11+
setenv =
12+
# Unset KUBECONFIG to prevent tests from picking up local cluster configuration
13+
KUBECONFIG = {envtmpdir}/.kubeconfig-nonexistent
1214
commands =
13-
python -V
14-
!functional: pytest -vvv -s {env:_TOX_COVERAGE_RUN:} --ignore=kubernetes/e2e_test
15-
functional: {toxinidir}/scripts/kube-init.sh pytest -vvv -s []
16-
coverage: python -m coverage xml
15+
python -V
16+
pytest -vvv -s {env:_TOX_COVERAGE_RUN:} --ignore=kubernetes/e2e_test {posargs}
17+
18+
[testenv:py3{10,11,12,13}-functional]
1719
setenv =
18-
coverage: _TOX_COVERAGE_RUN=--cov=kubernetes/watch --cov=kubernetes/config
20+
allowlist_externals =
21+
scripts/kube-init.sh
22+
commands =
23+
{toxinidir}/scripts/kube-init.sh pytest -vvv -s [] {posargs}
1924

20-
[testenv:docs]
25+
[testenv:coverage]
26+
setenv =
27+
{[testenv]setenv}
28+
_TOX_COVERAGE_RUN=--cov=kubernetes/watch --cov=kubernetes/config
2129
commands =
22-
python setup.py build_sphinx
30+
{[testenv:coverage]commands}
31+
python -m coverage xml
2332

24-
[testenv:update-pycodestyle]
33+
[testenv:docs]
34+
deps =
35+
-r{toxinidir}/doc/requirements.txt
2536
commands =
26-
{toxinidir}/scripts/update-pycodestyle.sh
37+
sphinx-build -W --keep-going -b html -j auto doc/source/ doc/build/html

0 commit comments

Comments
 (0)