-
Notifications
You must be signed in to change notification settings - Fork 7
/
tox.ini
89 lines (82 loc) · 2.01 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
86
87
88
89
[tox]
envlist = py{310,311,312}-docker
skipsdist = true
[testenv]
commands_pre =
poetry install --without ci --sync -v
# TODO: This can be removed once NLTK merges https://github.com/sloria/TextBlob/pull/469
python -m nltk.downloader punkt_tab
python -m textblob.download_corpora
commands =
pytest {posargs:tests}
passenv =
PALACE_*
CI
setenv =
docker: PALACE_TEST_DATABASE_URL_SCHEME=postgresql
docker: PALACE_TEST_DATABASE_URL_USER=palace
docker: PALACE_TEST_DATABASE_URL_PASSWORD=test
docker: PALACE_TEST_SEARCH_URL_SCHEME=http
docker: PALACE_TEST_MINIO_URL_SCHEME=http
docker: PALACE_TEST_MINIO_USER=palace
docker: PALACE_TEST_MINIO_PASSWORD=12345678901234567890
docker: PALACE_TEST_REDIS_URL_SCHEME=redis
docker =
docker: os-circ
docker: db-circ
docker: minio-circ
docker: redis-circ
allowlist_externals =
python
poetry
pytest
[testenv:report]
skip_install = true
commands =
coverage combine
coverage html
allowlist_externals =
poetry
coverage
[docker:db-circ]
image = postgres:16
environment =
POSTGRES_USER=palace
POSTGRES_PASSWORD=test
expose =
PALACE_TEST_DATABASE_URL_PORT=5432/tcp
host_var =
PALACE_TEST_DATABASE_URL_HOST
healthcheck_cmd = pg_isready
healthcheck_interval = 5
healthcheck_retries = 10
[docker:os-circ]
dockerfile = {toxinidir}/docker/Dockerfile.ci
dockerfile_target = opensearch
environment =
discovery.type=single-node
DISABLE_SECURITY_PLUGIN=true
expose =
PALACE_TEST_SEARCH_URL_PORT=9200/tcp
host_var =
PALACE_TEST_SEARCH_URL_HOST
[docker:minio-circ]
image = bitnami/minio:2022.3.3
environment =
MINIO_ROOT_USER=palace
MINIO_ROOT_PASSWORD=12345678901234567890
expose =
PALACE_TEST_MINIO_URL_PORT=9000/tcp
host_var =
PALACE_TEST_MINIO_URL_HOST
[docker:redis-circ]
image = redis/redis-stack-server:7.4.0-v0
expose =
PALACE_TEST_REDIS_URL_PORT=6379/tcp
host_var =
PALACE_TEST_REDIS_URL_HOST
[gh-actions]
python =
3.10: py310
3.11: py311
3.12: py312