-
Notifications
You must be signed in to change notification settings - Fork 3
/
tox.ini
64 lines (61 loc) · 1.83 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
[tox]
envlist = py36,py37,py38,py39,py310,mypy,lint
[testenv]
deps =
-r{toxinidir}/scripts/testing/requirements.txt
{toxinidir}/plugins/routemaster-prometheus
{toxinidir}/plugins/routemaster-statsd
{toxinidir}/plugins/routemaster-sentry
whitelist_externals =
mkdir
passenv=
PG_HOST
PG_PORT
PG_DB
PG_USER
PG_PASS
setenv =
PROMETHEUS_MULTIPROC_DIR={envtmpdir}
commands =
mkdir -p build/results
mkdir -p build/artifacts
py.test -v \
{posargs: \
--cov=routemaster \
--cov=routemaster_statsd \
--cov=routemaster_sentry \
--cov-report html:build/artifacts/coverage-{envname} \
--junit-xml=build/results/testing-{envname}.xml \
-p no:sugar\
}
[testenv:mypy]
deps =
-r{toxinidir}/scripts/typechecking/requirements.txt
{toxinidir}/plugins/routemaster-prometheus
{toxinidir}/plugins/routemaster-statsd
{toxinidir}/plugins/routemaster-sentry
whitelist_externals =
mkdir
commands =
mkdir -p build/results
mypy -p routemaster --junit-xml build/results/typechecking.xml --exclude plugins
mypy plugins/routemaster-prometheus/routemaster_prometheus --junit-xml build/results/typechecking-plugins-prometheus.xml
mypy plugins/routemaster-sentry/routemaster_sentry --junit-xml build/results/typechecking-plugins-sentry.xml
mypy plugins/routemaster-statsd/routemaster_statsd --junit-xml build/results/typechecking-plugins-statsd.xml
[testenv:lint]
deps =
-r{toxinidir}/scripts/linting/requirements.txt
whitelist_externals =
mkdir
test
ignore_errors = True
commands =
mkdir -p build/results
flake8 --output-file build/results/flake8.txt --tee \
routemaster \
plugins \
dev.py \
setup.py \
version.py
flake8_junit build/results/flake8.txt build/results/linting.xml
test flake8.txt