forked from twisted/twisted
-
Notifications
You must be signed in to change notification settings - Fork 0
/
tox.ini
144 lines (118 loc) · 5.24 KB
/
tox.ini
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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
; tox configuration file for running tests similar to buildbot builders.
;
; The main trial based environments are defined based on a set of tags. Each
; tag will trigger a different behavior. Multiple tags can be set for the same environment:
;
; * alldeps - install all possible dependencies.
; * nodeps - avoid installing any dependency.
; * withcov - run the tests wrapped using the coverage.
; * nocov - run the tests directly, without using the coverage wrapper.
; * wheel - build the wheel distribution
; * posix - prepare the tests to be run in a Linux/Unix/macOS environment.
; * macos - prepare the tests to be run in a OS X 10.11+ environment (superset of posix)
; * macos1010 - prepare the tests to be run in a OS X 10.10 environment (superset of posix)
; * windows - prepare the tests to be executed under Windows.
;
; Some tags are defined only while transitioning to an updated Buildbot and
; should be removed after the transition.
; See: https://github.com/twisted-infra/braid/issues/222
;
; * tests - similar to alldeps
; * coverage - similar to withcov and alldeps
; * nomodules - similar to nodeps
;
; There is a non-default `codecov-publish` environment used to publish the
; coverage results to codecov.io. It should be called after running the
; standard coverage environment.
;
; A non-default `txchecker-travis` environment is used to run twistedchecker
; on travis in --diff mode
;
[tox]
minversion=2.4
skip_missing_interpreters=True
toxworkdir=build/
envlist=
{py27,py33,py34,py35}-{alldeps,nodeps}-{withcov,nocov}-{posix,macos,macos1010,windows}
{py27,py35}-wheel
pyflakes,twistedchecker,apidocs,narrativedocs,topfile,manifest-checker
[testenv]
;; dependencies managed by extras in t.p._setup.py._EXTRAS_REQUIRE
extras =
{alldeps,tests,coverage}: all_non_platform
windows: windows_platform
{alldeps,tests}-macos: osx_platform
; Documentation
narrativedocs: dev
;; dependencies that are not specified as extras
deps =
py27-{alldeps,tests,coverage}-{posix,macos}: pysqlite
{withcov,coverage}: coverage
codecov-publish: codecov
wheel: wheel
; Code quality checkers
pyflakes{,3}: pyflakes
manifest-checker: check-manifest
{twistedchecker,txchecker-travis}: twistedchecker>=0.7.1
txchecker-travis: diff_cover
; All environment variables are passed.
passenv = *
setenv =
; Enable sub-processes coverage reports and store coverage reports in a
; known location.
COVERAGE_PROCESS_START = {toxinidir}/.coveragerc
COVERAGE_FILE = {toxinidir}/.coverage
# Help tests know where the base directory is.
TOX_INI_DIR = {toxinidir}
; Skip twistedchecker warnings that are not yet required in the required run
txchecker-travis-required: TWISTEDCHECKER_SKIP_WARNINGS = W9208,C0302
commands =
;
; Display information about Python interpreter
; which will be used in subsequent steps
;
python -c "import sys; print(sys.prefix)"
python -c "import sys; print(sys.exec_prefix)"
python -c "import sys; print(sys.executable)"
python --version
; Install PyDoctor here so it DOESNT overwrite Twisted
py27-{alldeps,tests}: pip install --no-deps epydoc pydoctor
apidocs: pip install --no-deps epydoc pydoctor
; Run tests without wrapping them using coverage.
{nocov,nomodules,tests}: python -m twisted.trial --reactor={env:TWISTED_REACTOR:default} --reporter={env:TRIAL_REPORTER:verbose} {posargs:twisted}
; Run the tests wrapped using coverage.
{withcov,coverage}: python {toxinidir}/admin/_copy.py {toxinidir}/admin/zz_coverage.pth {envsitepackagesdir}/zz_coverage.pth
{withcov,coverage}: coverage erase
{withcov,coverage}: coverage run -p --rcfile={toxinidir}/.coveragerc -m twisted.trial --reactor={env:TWISTED_REACTOR:default} --reporter={env:TRIAL_REPORTER:verbose} {posargs:twisted}
; Publish the coverage reports to codecov.io
codecov-publish: coverage combine
codecov-publish: coverage xml -o coverage.xml -i
codecov-publish: codecov {env:CODECOV_OPTIONS:}
; Build in a root folder so that buildbot can pick the result
wheel: python setup.py bdist_wheel --dist-dir {toxinidir}/dist
twistedchecker: twistedchecker src/{posargs:twisted}
txchecker-travis: {toxinidir}/.travis/twistedchecker-trunk-diff.sh {posargs:twisted}
pyflakes: pyflakes {posargs:src/twisted admin bin}
pyflakes3: /bin/sh -c "pyflakes $(find src/twisted admin bin \! -name "compat.py" \! -name "test_compat.py" \! -name "oscar.py" \! -name "test_oscar.py" -name '*.py' -o -name '*.3only')"
apidocs: {toxinidir}/bin/admin/build-apidocs {toxinidir}/src/ apidocs
narrativedocs: sphinx-build -aW -b html -d {toxinidir}/docs/_build {toxinidir}/docs {toxinidir}/docs/_build/
topfile: python {toxinidir}/bin/admin/check-topfile "{toxinidir}"
manifest-checker: check-manifest --ignore "docs/_build*,docs/historic/*,admin*,bin/admin*,twisted/topfiles/*.Old"
[testenv:twistedchecker]
basepython=python3.5
[testenv:pyflakes]
basepython=python2.7
[testenv:pyflakes3]
basepython=python3.5
[testenv:apidocs]
basepython=python2.7
[testenv:topfile]
basepython=python2.7
[testenv:manifest-checker]
basepython=python2.7
[testenv:txchecker-travis-required]
basepython=python3.5
usedevelop=True
[testenv:txchecker-travis-all]
basepython=python3.5
usedevelop=True