forked from twisted/twisted
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtox.ini
117 lines (96 loc) · 4.23 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
; tox configuration file for running tests similar to buildbot builders.
;
; 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.
;
[tox]
skip_missing_interpreters=True
toxworkdir=build/
envlist=
{py27,py33,py34,py35}-{tests,nomodules,coverage}-posix
py27-{tests,nomodules,coverage}-windows,
pyflakes,twistedchecker,apidocs,narrativedocs,topfile,manifest-checker
[testenv]
changedir={envtmpdir}
deps =
; Some relatively standard dependencies that we want to have
; We cannot use extras here, because it is not supported on Py3
{tests,coverage}: cryptography >= 0.9
{tests,coverage}: pyopenssl >= 16.0.0
{tests,coverage}: service_identity
{tests,coverage}: idna >= 0.6
{tests,coverage}: pyserial
{tests,coverage}: python-subunit
{tests,coverage}: pycrypto
{tests,coverage}: appdirs
{tests,coverage}: h2
{tests,coverage}: priority
{tests,coverage}: sphinx
py27-{tests,coverage}-posix: pysqlite
py27-{tests,coverage}: soappy
windows: pypiwin32
coverage: coverage
codecov-publish: codecov
; Code quality checkers
pyflakes{,3}: pyflakes
twistedchecker: twistedchecker
manifest-checker: check-manifest
; Documentation
apidocs: pydoctor
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 = {toxworkdir}/.coverage
commands =
; Install PyDoctor here so it DOESNT overwrite Twisted
py27-{tests,coverage}: pip install --no-deps epydoc pydoctor
{tests,nomodules}: {envbindir}/trial --reactor={env:TWISTED_REACTOR:default} --reporter={env:TRIAL_REPORTER:verbose} {posargs:twisted}
coverage: python {toxinidir}/admin/_copy.py {toxinidir}/admin/zz_coverage.pth {envsitepackagesdir}/zz_coverage.pth
coverage: coverage erase
# FIXME: https://bitbucket.org/ned/coveragepy/issues/506
# Here we have a conditional coverage run as we have bin/trial on posix
# and Scripts/trial.exe on Windows.
coverage-posix: coverage run -p --rcfile={toxinidir}/.coveragerc {envbindir}/trial --reactor={env:TWISTED_REACTOR:default} --reporter={env:TRIAL_REPORTER:verbose} {posargs:twisted}
# FIXME: https://twistedmatrix.com/trac/ticket/8611
# {toxinidir}/bin/trial works for Python 2.7 but not for Python 3.4
coverage-windows: coverage run -p --rcfile={toxinidir}/.coveragerc {toxinidir}/bin/trial --reactor={env:TWISTED_REACTOR:default} --reporter={env:TRIAL_REPORTER:verbose} {posargs:twisted}
# Continue with copying the files outside of the ven and into the root dir
# so that buildbot or other jobs can access them.
# FIXME: https://twistedmatrix.com/trac/ticket/8599
# FIXME: https://github.com/twisted-infra/braid/issues/209
# Once buildbot is updated to use tox to publish the coverage we should
# remove these lines.
coverage: python {toxinidir}/admin/_copy.py "{toxworkdir}/.coverage*" {toxinidir}
codecov-publish: coverage combine {toxworkdir}
codecov-publish: coverage xml -o coverage.xml -i
codecov-publish: codecov {env:CODECOV_OPTIONS:}
twistedchecker: twistedchecker {posargs:twisted}
pyflakes: pyflakes {posargs:twisted admin bin}
pyflakes3: pyflakes {posargs:twisted/internet/test/_awaittests.py.3only}
apidocs: {toxinidir}/bin/admin/build-apidocs {toxinidir} 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
changedir={toxinidir}
[testenv:pyflakes]
basepython=python2.7
changedir={toxinidir}
[testenv:pyflakes3]
basepython=python3.5
changedir={toxinidir}
[testenv:apidocs]
basepython=python2.7
changedir={toxinidir}
[testenv:topfile]
basepython=python2.7
changedir={toxinidir}
[testenv:manifest-checker]
basepython=python2.7
changedir={toxinidir}