-
Notifications
You must be signed in to change notification settings - Fork 0
/
tox.ini
85 lines (81 loc) · 3.21 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
[pytest]
xfail_strict=true
[tox]
envlist = tests
skipsdist = true
requires =
tox>=3.16.1,<4
tox-faster
tox-pyenv
tox-run-command
tox-envfile
tox_pyenv_fallback = false
[testenv]
skip_install = true
setenv =
PYTHONPATH = .
PYTHONUNBUFFERED = 1
dev: DEV = {env:DEV:true}
dev: NEW_RELIC_APP_NAME = {env:NEW_RELIC_APP_NAME:checkmate}
dev: NEW_RELIC_ENVIRONMENT = {env:NEW_RELIC_ENVIRONMENT:dev}
dev: SENTRY_ENVIRONMENT = {env:SENTRY_ENVIRONMENT:dev}
dev: CELERY_BROKER_URL={env:CELERY_BROKER_URL:amqp://guest:guest@localhost:5673//}
dev: DATABASE_URL={env:DATABASE_URL:postgresql://postgres@localhost:5434/postgres}
dev: CHECKMATE_BLOCKLIST_URL = {env:CHECKMATE_BLOCKLIST_URL:http://dummy.example.com/blocklist}
dev: PUBLIC_SCHEME = {env:PUBLIC_SCHEME:http}
dev: PUBLIC_HOST = {env:PUBLIC_HOST:localhost}
dev: PUBLIC_PORT = {env:PUBLIC_PORT:9099}
dev: CHECKMATE_SECRET = not_a_secret
dev: CHECKMATE_API_KEY_DEV = dev_api_key
dev: WEB_CONCURRENCY = {env:WEB_CONCURRENCY:2}
dev: DATABASE_URL = {env:DATABASE_URL:postgresql://postgres@localhost:5434/postgres}
tests: DATABASE_URL = {env:DATABASE_URL:postgresql://postgres@localhost:5434/checkmate_test}
functests: DATABASE_URL = {env:DATABASE_URL:postgresql://postgres@localhost:5434/checkmate_functests}
OBJC_DISABLE_INITIALIZE_FORK_SAFETY = YES
passenv =
HOME
dev: CHROME_EXTENSION_ID
dev: SENTRY_DSN
dev: NEW_RELIC_LICENSE_KEY
dev: CHECKMATE_BLOCKLIST_URL
dev: GOOGLE_CLIENT_ID
dev: GOOGLE_CLIENT_SECRET
deps =
-r requirements/{env:TOX_ENV_NAME}.txt
depends =
coverage: tests
whitelist_externals =
dev: gunicorn
dev: newrelic-admin
{tests,functests}: sh
commands =
pip-sync-faster requirements/{env:TOX_ENV_NAME}.txt --pip-args '--disable-pip-version-check'
dev: {posargs:supervisord -c conf/supervisord-dev.conf}
tests: sh bin/create-db checkmate_test
functests: sh bin/create-db checkmate_functests
lint: pydocstyle --explain checkmate
lint: pydocstyle --config tests/.pydocstyle --explain tests
lint: pylint {posargs:checkmate bin}
lint: pylint --rcfile=tests/.pylintrc tests
format: black checkmate tests bin
format: isort --quiet --atomic checkmate tests bin
checkformatting: black --check checkmate tests bin
checkformatting: isort --quiet --check-only checkmate tests bin
{tests,functests}: python3 -m checkmate.scripts.init_db --delete --create
tests: coverage run -m pytest {posargs:tests/unit/}
coverage: -coverage combine
coverage: coverage report
functests: pytest {posargs:tests/functional/}
sitepackages = {env:SITE_PACKAGES:false}
[testenv:dev]
# By default when you Ctrl-c the `make dev` command tox is too aggressive about
# killing supervisor. tox kills supervisor before supervisor has had time to
# stop or kill its child processes, resulting in detached child processes being
# left running and other problems.
#
# Fix this by configuring tox to wait a long time before sending any further
# SIGINTs (after the first one) or SIGTERMs or SIGKILLs to supervisor.
# Just trust supervisor to clean up all its child processes and stop.
suicide_timeout = 60.0
interrupt_timeout = 60.0
terminate_timeout = 60.0