forked from project-koku/koku
-
Notifications
You must be signed in to change notification settings - Fork 0
/
tox.ini
69 lines (66 loc) · 2.44 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
[tox]
envlist = py39
skipsdist = True
[flake8]
; D106 = Missing docstring in public nested class
; D212 = Multi-line docstring summary should start at the first line
; W503 = Line break before binary operator
ignore = D106,D212,W503
max-complexity = 10
max-line-length = 120
exclude =
**/migrations/*.py
**/manage.py
**/settings.py
**/.unleash/
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: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:''}
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
codecov
commands =
/bin/sh {toxinidir}/dev/scripts/check_postgres_running.sh
/bin/sh {toxinidir}/dev/scripts/create_test_db_user.sh
pipenv install --dev --ignore-pipfile
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
codecov
commands =
/bin/sh {toxinidir}/dev/scripts/check_postgres_running.sh
/bin/sh {toxinidir}/dev/scripts/create_test_db_user.sh
pipenv install --dev --ignore-pipfile
coverage run --parallel-mode --concurrency=multiprocessing {toxinidir}/koku/manage.py test --noinput --parallel -v 2 {posargs: koku/}
coverage combine
coverage report --show-missing