-
Notifications
You must be signed in to change notification settings - Fork 0
/
tox.ini
48 lines (40 loc) · 914 Bytes
/
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
[tox]
envlist = clean,py310,py311,report
skip_missing_interpreters=true
[testenv]
description = Run unit tests for iometrics-alerta
deps =
pytest
coverage
requests_mock
postgres: psycopg2
whitelist_externals =
createdb
dropdb
pytest
allowlist_externals =
createdb
dropdb
commands_pre =
-createdb -h 127.0.0.1 -U alerta testing_database
commands = coverage run -m pytest -s {posargs:tests}
commands_post =
-dropdb -h 127.0.0.1 -U alerta testing_database
depends =
py310,py311: clean
report: py310,py311
#passenv = *
setenv =
ALERTA_SVR_CONF_FILE =
DATABASE_URL = iometrics://alerta:postgres_password@127.0.0.1/testing_database
PGPASSWORD = postgres_password
[testenv:report]
skip_install = true
deps = coverage
commands =
coverage html --omit="tests/*"
coverage report --omit="tests/*"
[testenv:clean]
deps = coverage
skip_install = true
commands = coverage erase