diff options
Diffstat (limited to 'tox.ini')
-rw-r--r-- | tox.ini | 80 |
1 files changed, 52 insertions, 28 deletions
@@ -1,43 +1,67 @@ +# Generated from: +# https://github.com/zopefoundation/meta/tree/master/config/c-code [tox] +minversion = 3.18 envlist = - py27,py27-pure,py35,py36,py36-pure,py37,py38,pypy,coverage,docs + lint + py27,py27-pure + py35,py35-pure + py36,py36-pure + py37,py37-pure + py38,py38-pure + py39,py39-pure + pypy + pypy3 + docs + coverage [testenv] +usedevelop = true deps = - .[test,docs] + # Until repoze.sphinx.autointerface supports Sphinx 4.x we cannot use it: + Sphinx < 4 +setenv = + pure: PURE_PYTHON=1 + !pure-!pypy-!pypy3: PURE_PYTHON=0 commands = - zope-testrunner --test-path=src - sphinx-build -b doctest -d {envdir}/doctrees docs {envdir}/doctest + zope-testrunner --test-path=src {posargs:-vc} + !py27-!pypy: sphinx-build -b doctest -d {envdir}/.cache/doctrees docs {envdir}/.cache/doctest +extras = + test + docs [testenv:coverage] -usedevelop = true -basepython = - python2.7 -commands = - coverage run -m zope.testrunner --test-path=src [] - coverage run -a -m sphinx -b doctest -d {envdir}/.cache/doctrees docs {envdir}/.cache/doctest - coverage report --fail-under=100 +basepython = python3 +allowlist_externals = + mkdir deps = - {[testenv]deps} coverage +setenv = + PURE_PYTHON=1 +commands = + mkdir -p {toxinidir}/parts/htmlcov + coverage run -m zope.testrunner --test-path=src {posargs:-vc} + coverage html -i + coverage report -i -m --fail-under=99 + +[testenv:lint] +basepython = python3 +skip_install = true +deps = + flake8 + check-manifest + check-python-versions +commands = + flake8 src setup.py + check-manifest + check-python-versions [testenv:docs] -basepython = - python2.7 +basepython = python3 +skip_install = false +# Until repoze.sphinx.autointerface supports Sphinx 4.x we cannot use it: +deps = Sphinx < 4 +commands_pre = commands = sphinx-build -b html -d docs/_build/doctrees docs docs/_build/html sphinx-build -b doctest -d docs/_build/doctrees docs docs/_build/doctest -deps = - .[test,docs] - -[testenv:py27-pure] -basepython = - python2.7 -setenv = - PURE_PYTHON = 1 - -[testenv:py36-pure] -basepython = - python3.6 -setenv = - PURE_PYTHON = 1 |