-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathtox.ini
151 lines (138 loc) · 3.06 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
150
151
[tox]
envlist =
clean,
flake8, pylint, mypy,
py{27,35,py}-django{110}-{base,example1,flake8},
py{27,35,36,py}-django{111}-{base,example1,flake8},
docs
skip_missing_interpreters = true
minversion = 2.7.0
[tox:travis]
2.7 = py27
3.5 = py35
3.6 = py36, flake8, docs
[flake8]
ignore=E305
max_line_length=119
[testenv]
install_command=pip install --pre {opts} {packages}
deps=
coverage
base: django-rainbowtests
django110: Django>=1.10,<1.11
django111: Django<2.0
django20: Django>=2.0
djangotrunk: https://github.com/django/django/archive/master.zip
base: hypothesis
py27,py35,py36: psycopg2
pypy,py27: mock
pypy,pypy3: psycopg2cffi
pytz
sqlparse
flake8: flake8
setenv=
DB_NAME={envname}
commands=
pypy,pypy3: /bin/sh -c "echo 'from psycopg2cffi import compat; compat.register()' > {envdir}/site-packages/psycopg2.py"
base: coverage run --parallel-mode --branch --source=boardinghouse --omit="boardinghouse/contrib/invite/*" runtests.py -Wd
example1: {[example1]commands}
flake8: flake8 boardinghouse
whitelist_externals=
example1: createdb
example1: dropdb
[testenv:clean]
deps=
coverage
commands=
coverage erase
[testenv:docs]
changedir=docs
deps= -rdocs/requirements.txt
commands=
make clean
rm -rf source/code/*
make apidocs
make
sphinx-build -b html -d build/doctrees source build/html
whitelist_externals=
/usr/bin/make
/bin/rm
[example1:loaddata]
commands=
python examples/boarding_school/manage.py migrate
python examples/boarding_school/manage.py loaddata user
python examples/boarding_school/manage.py loaddata schools
python examples/boarding_school/manage.py loaddata --schema hamilton hamilton
python examples/boarding_school/manage.py loaddata --schema naracoorte_hs naracoorte_hs
[example1]
commands=
dropdb --if-exists {env:DB_NAME}
createdb {env:DB_NAME}
{[example1:loaddata]commands}
python examples/boarding_school/manage.py migrate boardinghouse zero
{[example1:loaddata]commands}
[testenv:flake8]
basepython=python3.6
deps=
flake8
commands=
flake8 boardinghouse
[testenv:isort]
# I can't seem to get this to reliably pick up the correct settings.
basepython=python3.6
deps=
isort
commands=
isort -rc -c boardinghouse
[testenv:pylint]
# We generally don't use this in automated tests, because it's too strict. Maybe after
# tweaking the config for it!
basepython=python3.6
deps=
pylint
django
commands=
pylint boardinghouse
ignore_outcome=true
[testenv:mypy]
basepython=python3.6
setenv=
MYPYPATH=stubs/out
deps=
mypy-lang
typing
commands=
mypy boardinghouse
mypy --py2 boardinghouse
ignore_outcome=true
[testenv:status]
basepython=python3.6
deps=
coverage
; codecov
python-coveralls
commands=
coverage combine
coverage report
; codecov
coveralls
coverage report --fail-under=95
rm -rf htmlcov
coverage html
whitelist_externals=
/bin/rm
passenv=
CODECOV_TOKEN
COVERALLS_REPO_TOKEN
CI
CI_BUILD_NUMBER
CI_BUILD_URL
CI_BRANCH
CI_COMMIT_ID
CI_NAME
CI_MESSAGE
[testenv:mutants]
deps=
mutpy
commands=
mut.py --target boardinghouse --unit-test tests