From cb42892839e2bc8f86cfeb68bf9334f508578cbd Mon Sep 17 00:00:00 2001 From: Bert JW Regeer Date: Sun, 2 Feb 2020 22:54:26 -0800 Subject: Update tox.ini to new world order --- tox.ini | 101 ++++++++++++++++++++++++++++++++++++++++++---------------------- 1 file changed, 67 insertions(+), 34 deletions(-) diff --git a/tox.ini b/tox.ini index b9f7fa2..04ca1d5 100644 --- a/tox.ini +++ b/tox.ini @@ -1,56 +1,89 @@ [tox] envlist = - py27,py35,py36,py37,py38,pypy,pypy3, + lint, + py27,pypy, + py35,py36,py37,py38,pypy3, docs, - {py27,py35}-cover,coverage + coverage +isolated_build = True [testenv] commands = python --version - nosetests --with-xunit --xunit-file=nosetests-{envname}.xml {posargs:waitress} - + nosetests {posargs:} extras = testing +setenv = + COVERAGE_FILE=.coverage.{envname} -[testenv:docs] -basepython = python3.5 -whitelist_externals = make +[testenv:coverage] +basepython = python3.8 commands = - make -C docs clean html epub BUILDDIR={envdir} "SPHINXOPTS=-W -E" -extras = - docs + coverage combine + coverage xml + coverage report --show-missing +deps = + coverage +setenv = + COVERAGE_FILE=.coverage +depends = py27, py35 -[py-cover] +[testenv:lint] +skip_install = True +basepython = python3.8 commands = - coverage run {envbindir}/nosetests waitress - coverage combine - coverage xml -o {envname}.xml + black --check --diff . + check-manifest + # build sdist/wheel + python -m pep517.build . + twine check dist/* +deps = + black + readme_renderer + check-manifest + pep517 + twine +[testenv:docs] +whitelist_externals = + make +commands = + make -C docs html BUILDDIR={envdir} SPHINXOPTS="-W -E" extras = - testing + docs -[testenv:py27-cover] +[testenv:run-flake8] +skip_install = True +basepython = python3.8 commands = - {[py-cover]commands} - -setenv = - COVERAGE_FILE=.coverage.py2 + flake8 src/waitress/ tests +deps = + flake8 + flake8-bugbear -[testenv:py35-cover] +[testenv:run-black] +skip_install = True +basepython = python3.8 commands = - {[py-cover]commands} - -setenv = - COVERAGE_FILE=.coverage.py3 + black . +deps = + black -[testenv:coverage] -basepython = python3.5 +[testenv:build] +skip_install = true +basepython = python3.8 commands = - coverage combine - coverage xml - coverage report --show-missing --fail-under=100 -deps = - coverage -setenv = - COVERAGE_FILE=.coverage + # clean up build/ and dist/ folders + python -c 'import shutil; shutil.rmtree("build", ignore_errors=True)' + # Make sure we aren't forgetting anything + check-manifest + # build sdist/wheel + python -m pep517.build . + # Verify all is well + twine check dist/* +deps = + readme_renderer + check-manifest + pep517 + twine -- cgit v1.2.1