-
Notifications
You must be signed in to change notification settings - Fork 93
/
tox.ini
71 lines (67 loc) · 2.39 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
[tox]
envlist = py311
skipsdist = True
[flake8]
; E203 = Whitespace before ':', conflicts with black
; W503 = Line break before binary operator
ignore =
E203,
W503,
max-complexity = 10
max-line-length = 120
exclude =
**/migrations/*.py
**/manage.py
**/settings.py
**/.unleash/
per-file-ignores =
koku/reporting/models.py: F401
import-order-style = pycharm
application-import-names = koku, api, providers, reporting, reporting_common, cost_models, masu
[testenv]
setenv =
DATABASE_SERVICE_NAME={env:DATABASE_SERVICE_NAME:POSTGRES_SQL}
DATABASE_ENGINE={env:DATABASE_ENGINE:postgresql}
DATABASE_NAME={env:DATABASE_NAME:postgres}
POSTGRES_SQL_SERVICE_HOST={env:POSTGRES_SQL_SERVICE_HOST:localhost}
POSTGRES_SQL_SERVICE_PORT={env:POSTGRES_SQL_SERVICE_PORT:15432}
DATABASE_ADMIN={env:DATABASE_ADMIN:postgres}
DATABASE_USER=koku_tester
DATABASE_PASSWORD={env:DATABASE_PASSWORD:''}
ACCOUNT_ENHANCED_METRICS={env:ACCOUNT_ENHANCED_METRICS:True}
prometheus_multiproc_dir=/tmp
TRINO_DATE_STEP={env:TRINO_DATE_STEP:31}
UNLEASH_HOST={env:UNLEASH_HOST:localhost}
MIDDLEWARE_TIME_TO_LIVE={env:MIDDLEWARE_TIME_TO_LIVE:0}
ENHANCED_ORG_ADMIN={env:ENHANCED_ORG_ADMIN:True}
ENABLE_S3_ARCHIVING=True
deps =
pipenv
commands =
/bin/sh {toxinidir}/dev/scripts/check_postgres_running.sh
/bin/sh {toxinidir}/dev/scripts/create_test_db_user.sh
pipenv install --dev --deploy
coverage run {toxinidir}/koku/manage.py test --noinput -v 2 {posargs: koku/}
coverage report --show-missing
# The same tests as testenv, but run in parallel
[testenv:parallel]
setenv =
DATABASE_SERVICE_NAME={env:DATABASE_SERVICE_NAME:POSTGRES_SQL}
DATABASE_ENGINE={env:DATABASE_ENGINE:postgresql}
DATABASE_NAME={env:DATABASE_NAME:koku_test}
POSTGRES_SQL_SERVICE_HOST={env:POSTGRES_SQL_SERVICE_HOST:localhost}
POSTGRES_SQL_SERVICE_PORT={env:POSTGRES_SQL_SERVICE_PORT:15432}
DATABASE_ADMIN={env:DATABASE_ADMIN:postgres}
DATABASE_USER=koku_tester
DATABASE_PASSWORD={env:DATABASE_PASSWORD:''}
PROMETHEUS_MULTIPROC_DIR=/tmp
UNLEASH_HOST={env:UNLEASH_HOST:localhost}
deps =
pipenv
commands =
/bin/sh {toxinidir}/dev/scripts/check_postgres_running.sh
/bin/sh {toxinidir}/dev/scripts/create_test_db_user.sh
pipenv install --dev --deploy
coverage run --parallel-mode --concurrency=multiprocessing {toxinidir}/koku/manage.py test --noinput --parallel -v 2 {posargs: koku/}
coverage combine
coverage report --show-missing