-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtox.ini
70 lines (56 loc) · 1.75 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
[tox]
envlist = py311-{frozen,current},pre-commit,audit
[testenv]
# Pass through some environment variables
passenv = CI
setenv =
ZULU_SYSLOG_DISABLE = 1
# Ignore all "not installed in testenv" warnings.
allowlist_externals =
.mise/tasks/reqs-*
# pip is used below to install the app
skip_install = true
commands =
frozen: .mise/tasks/reqs-bootstrap
# Calling as a script has the added benefit here that the compilation won't be called due to the
# task dependency. That's desired here so we are testing the .txt deps as they exist on disk.
frozen: .mise/tasks/reqs-sync common.txt
current: pip --quiet install -r requirements/common.in
# You can't specify this in requirements.in b/c the file reference in requirements.txt becomes
# an absolute path (which would break on CI and other dev's machines)
current: pip --quiet install -e .
zulu --config-profile testing db init
# Run the primary tests for tests environment
py.test \
-ra \
--tb native \
--strict-markers \
--cov zulu \
--cov-config .coveragerc \
--cov-report xml \
--no-cov-on-fail \
--junit-xml={toxinidir}/.ci/test-reports/{envname}.pytests.xml \
zulu {posargs}
# Make sure alembic migrations only have one head.
python scripts/count-heads.py
[testenv:pre-commit]
basepython = py311
skip_install = true
usedevelop = false
deps =
pre-commit
commands =
pre-commit run --all-files --show-diff-on-failure -v
[testenv:audit]
basepython = py311
skip_install = true
usedevelop = false
deps =
pip-audit
allowlist_externals =
invoke
pip-audit
commands =
# pip-audit is more efficient operating from the current environment
.mise/tasks/reqs-sync
pip-audit