-
Notifications
You must be signed in to change notification settings - Fork 148
/
tox.ini
97 lines (85 loc) · 2.32 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
[tox]
envlist = docker
[testenv:docker]
allowlist_externals=docker
passenv =
PYTHON_VERSION
TOXENV
setenv =
PYTHON_VERSION=3.11
TOXENV=check,py311
deps =
usedevelop = false
depends =
skip_install = true
commands =
docker build --build-arg PYTHON_VERSION={env:PYTHON_VERSION} -t balrog_backend-{envname}-test -f Dockerfile.test .
docker run --rm -v {toxinidir}:/app -v balrog_backend-{envname}-tox:/app/.tox -e TOXENV={env:TOXENV} balrog_backend-{envname}-test test
[testenv]
depends = clean
setenv =
PYTHONDONTWRITEBYTECODE=1
HYPOTHESIS_STORAGE_DIRECTORY=/tmp
usedevelop = True
deps =
--no-deps
-r {toxinidir}/requirements/test.txt
commands =
{posargs:py.test -n auto --cov-config=tox.ini --cov-append --cov=auslib --cov-report term-missing tests}
coverage run -a scripts/test-rules.py
[testenv:clean]
skip_install = true
commands = coverage erase
depends =
[testenv:report]
skip_install = true
commands = coverage report -m
depends = py311
parallel_show_output = true
[testenv:coveralls]
passenv =
COVERALLS_REPO_TOKEN
CI_PULL_REQUEST
setenv =
CIRCLECI=1
skip_install = true
depends = py311
commands = coveralls
[testenv:check]
skip_install = true
commands =
black --diff --check scripts src taskcluster tests uwsgi
isort --check --diff scripts src taskcluster tests uwsgi
flake8 scripts src taskcluster tests uwsgi
pip-compile-multi verify
check-manifest -v {toxinidir}
[flake8]
max-line-length = 160
exclude = .ropeproject,.tox,sandbox,build
show-source = True
# flake8 doesn't differentiat the use of `:` in dictionaries vs. slices,
# whereas # black formats the a later with surrounding whitespace. This causes
# flake8 to incorrecly report E203.
# See https://black.readthedocs.io/en/stable/the_black_code_style.html#slices
# W503 is a default ignore, but gets overridden when we set this, so we need
# to add it again ourselves.
ignore = E203,W503
[pytest]
norecursedirs = .tox .git .hg sandbox build
python_files = test_*.py
filterwarnings =
ignore
error:::auslib
ignore::ImportWarning:auslib.db
default::DeprecationWarning:auslib
default::PendingDeprecationWarning:auslib
[coverage:run]
branch = true
source = auslib
omit = auslib.migrate.versions
[coverage:paths]
source =
src/
.tox/*/lib/python*/site-packages/
[coverage:report]
show_missing = True