-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtox.ini
46 lines (40 loc) · 1.02 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
[tox]
isolated_build = true
envlist = py310
[testenv]
setenv =
DB_DSN = postgres://postgres:postgres@localhost:5432/postgres?sslmode=disable
deps =
-r requirements.txt
[testenv:checks]
description = code checks: run with `tox -e checks`
commands =
isort src tests --profile black --check
black src tests -l 120 --check
[testenv:ci]
description = tests: run with `tox -e test`
commands =
isort src tests --profile black --check
black src tests -l 120 --check
pytest -v
docker = postgres
[testenv:test]
description = tests: run with `tox -e test`
commands = pytest -v
docker = postgres
[docker:postgres]
image = postgres:13.4-alpine
environment =
POSTGRES_DB=postgres
PGUSER=postgres
POSTGRES_PASSWORD=postgres
POSTGRES_HOST_AUTH_METHOD=trust
ports =
5432:5432/tcp
healthcheck_cmd = pg_isready
healthcheck_timeout = 5
healthcheck_retries = 5
healthcheck_interval = 5
healthcheck_start_period = 1
volumes =
bind:ro:{toxinidir}/migrations/schema.sql:/docker-entrypoint-initdb.d/0.init.sql