forked from twisted/twisted
-
Notifications
You must be signed in to change notification settings - Fork 0
/
tox.ini
149 lines (123 loc) · 5.48 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
145
146
147
148
149
; 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]
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]
deps =
; Some relatively standard dependencies that we want to have
; We cannot use extras here, because it is not supported on Py3
{alldeps,tests,coverage}: cryptography >= 0.9
{alldeps,tests,coverage}: pyopenssl >= 16.0.0
{alldeps,tests,coverage}: service_identity
{alldeps,tests,coverage}: idna >= 0.6
{alldeps,tests,coverage}: pyserial
{alldeps,tests,coverage}: python-subunit
{alldeps,tests,coverage}: pycrypto
{alldeps,tests,coverage}: appdirs
{alldeps,tests,coverage}: h2
{alldeps,tests,coverage}: priority
{alldeps,tests,coverage}: sphinx
py27-{alldeps,tests,coverage}-{posix,macos}: pysqlite
py27-{alldeps,tests,coverage}: soappy
windows: pypiwin32
{alldeps,tests}-macos: pyobjc-core
{alldeps,tests}-macos: pyobjc-framework-CFNetwork
{alldeps,tests}-macos1010: pyobjc-core==3.0.4
{alldeps,tests}-macos1010: pyobjc-framework-CFNetwork==3.0.4
{alldeps,tests}-macos1010: pyobjc-framework-Cocoa==3.0.4
{withcov,coverage}: coverage
codecov-publish: codecov
wheel: wheel
; Code quality checkers
pyflakes{,3}: pyflakes
manifest-checker: check-manifest
{twistedchecker,txchecker}: twistedchecker>=0.6.0
txchecker: diff_cover
; Documentation
narrativedocs: sphinx
; 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}
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: pyflakes {posargs:src/twisted/internet/test/_awaittests.py.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=python2.7
[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