tox.ini 3.19 KB
Newer Older
1
[tox]
2
envlist =
3 4 5
    lint,
    py27,py34,py35,py36,py37,py38,pypy,pypy3,
    docs,{py2,py3}-cover,coverage,
6 7

[testenv]
8 9
# Most of these are defaults but if you specify any you can't fall back
# to defaults for others.
10
basepython =
11 12 13
    py27: python2.7
    py34: python3.4
    py35: python3.5
14 15
    py36: python3.6
    py37: python3.7
16
    py38: python3.8
17
    pypy: pypy
18
    pypy3: pypy3
19
    py2: python2.7
20
    py3: python3.6
21 22 23 24

commands =
    nosetests --with-xunit --xunit-file=nosetests-{envname}.xml {posargs:}

25 26 27
extras =
    testing

28
[testenv:py27-scaffolds]
29
basepython = python2.7
30
commands =
31
    python src/pyramid/scaffolds/tests.py
32 33
deps = virtualenv

34 35
[testenv:py34-scaffolds]
basepython = python3.4
36
commands =
37
    python src/pyramid/scaffolds/tests.py
38 39
deps = virtualenv

40 41
[testenv:py35-scaffolds]
basepython = python3.5
42
commands =
43
    python src/pyramid/scaffolds/tests.py
44 45
deps = virtualenv

46 47
[testenv:py36-scaffolds]
basepython = python3.6
48
commands =
49 50 51 52 53 54 55
    python src/pyramid/scaffolds/tests.py
deps = virtualenv

[testenv:py37-scaffolds]
basepython = python3.7
commands =
    python src/pyramid/scaffolds/tests.py
56 57 58 59 60
deps = virtualenv

[testenv:pypy-scaffolds]
basepython = pypy
commands =
61
    python src/pyramid/scaffolds/tests.py
62 63
deps = virtualenv

64 65 66
[testenv:lint]
skip_install = true
basepython = python3.6
67
commands =
68 69 70 71
    flake8 src/pyramid tests setup.py
    black --check --diff src/pyramid tests setup.py
    python setup.py check -r -s -m
    check-manifest
72 73
deps =
    flake8
74 75 76
    black
    readme_renderer
    check-manifest
77 78

[testenv:docs]
79
# pin to 3.5 to match what RTD uses
80 81 82
basepython = python3.5
whitelist_externals = make
commands =
83
    make -C docs doctest html epub BUILDDIR={envdir} "SPHINXOPTS=-W -E"
84 85
extras =
    docs
86 87 88 89 90 91

[testenv:pdf]
basepython = python3.5
whitelist_externals = make
commands =
    make -C docs latexpdf BUILDDIR={envdir} "SPHINXOPTS=-W -E"
92 93
extras =
    docs
94 95 96 97

# we separate coverage into its own testenv because a) "last run wins" wrt
# cobertura jenkins reporting and b) pypy and jython can't handle any
# combination of versions of coverage and nosexcover that i can find.
98 99
[testenv:py2-cover]
commands =
100
    coverage run {envbindir}/nosetests
101 102 103
    coverage xml -o coverage-py2.xml
setenv =
    COVERAGE_FILE=.coverage.py2
104 105
extras =
    testing
106 107 108

[testenv:py3-cover]
commands =
109
    coverage run {envbindir}/nosetests
110 111 112
    coverage xml -o coverage-py3.xml
setenv =
    COVERAGE_FILE=.coverage.py3
113 114
extras =
    testing
115

116
[testenv:coverage]
117 118
skip_install = true
basepython = python3.6
119 120 121 122
commands =
    coverage erase
    coverage combine
    coverage xml
123
    coverage report --fail-under=100
124 125 126 127
deps =
    coverage
setenv =
    COVERAGE_FILE=.coverage
128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151

[testenv:black]
skip_install = true
basepython = python3.6
commands =
    black src/pyramid tests setup.py
deps =
    black

[testenv:build]
skip_install = true
basepython = python3.6
commands =
    # clean up build/ and dist/ folders
    python -c 'import shutil; shutil.rmtree("dist", ignore_errors=True)'
    python setup.py clean --all
    # build sdist
    python setup.py sdist --dist-dir {toxinidir}/dist
    # build wheel from sdist
    pip wheel -v --no-deps --no-index --no-build-isolation --wheel-dir {toxinidir}/dist --find-links {toxinidir}/dist pyramid

deps =
    setuptools
    wheel