summaryrefslogtreecommitdiff
path: root/tox.ini
blob: f5c8320d224060243bfb4613f88f0fcaf965e66d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
# Generated from:
# https://github.com/zopefoundation/meta/tree/master/config/pure-python
[tox]
minversion = 3.18
envlist =
    lint
    py37
    py38
    py39
    py310
    py311
    pypy3
    docs
    coverage

[testenv]
usedevelop = true
deps =
commands =
    zope-testrunner --test-path=src {posargs:-vc}
    sphinx-build -b doctest -d {envdir}/.cache/doctrees docs {envdir}/.cache/doctest
extras =
    test
    docs
    untrusted

[testenv:lint]
basepython = python3
skip_install = true
commands =
    isort --check-only --diff {toxinidir}/src {toxinidir}/setup.py
    flake8 src setup.py
    check-manifest
    check-python-versions
deps =
    check-manifest
    check-python-versions >= 0.19.1
    wheel
    flake8
    isort

[testenv:isort-apply]
basepython = python3
skip_install = true
commands_pre =
deps =
    isort
commands =
    isort {toxinidir}/src {toxinidir}/setup.py []

[testenv:docs]
basepython = python3
skip_install = false
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

[testenv:coverage]
basepython = python3
allowlist_externals =
    mkdir
deps =
    coverage
commands =
    mkdir -p {toxinidir}/parts/htmlcov
    coverage run -m zope.testrunner --test-path=src {posargs:-vc}
    coverage run -a -m sphinx -b doctest -d {envdir}/.cache/doctrees docs {envdir}/.cache/doctest
    coverage html --ignore-errors
    coverage report --ignore-errors --show-missing --fail-under=98

[coverage:run]
branch = True
source = zope.pagetemplate

[coverage:report]
precision = 2
exclude_lines =
    pragma: no cover
    pragma: nocover
    except ImportError:
    raise NotImplementedError
    if __name__ == '__main__':
    self.fail
    raise AssertionError

[coverage:html]
directory = parts/htmlcov