-
Notifications
You must be signed in to change notification settings - Fork 0
/
tox.ini
84 lines (77 loc) · 2.87 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
[tox]
envlist = py36-{unit,registry,mysql,psql}
skipsdist = True
[pytest]
norecursedirs = node_modules
testpaths = ./
python_files = **/test/test*.py
confcutdir = test
[testenv]
deps =
-r{toxinidir}/requirements.txt
-r{toxinidir}/requirements-dev.txt
setenv =
PYTHONDONTWRITEBYTECODE = 1
PYTHONPATH={toxinidir}{:}{toxinidir}
TEST=true
registry: FILE=test/registry/registry_tests.py
unit: FILE=""
# TODO(kleesc): Re-enable buildman tests after buildman rewrite
commands =
python --version
alembic upgrade head
py.test --timeout=3600 --cov-report=html --cov-report=term-missing -x --color no --verbose --ignore=buildman/ {env:FILE} -vv {posargs}
[docker:mysql:5.7]
healthcheck_cmd = mysql -uroot -D information_schema -e "SELECT * FROM plugins LIMIT 0;"
healthcheck_interval = 25
healthcheck_timeout = 10
healthcheck_retries = 3
healthcheck_start_period = 25
ports = 3306:3306/tcp
[testenv:py36-mysql]
setenv =
PYTHONDONTWRITEBYTECODE = 1
PYTHONPATH={toxinidir}{:}{toxinidir}
TEST=true
SKIP_DB_SCHEMA=true
PYTEST_ADDOPTS=--ignore=endpoints/appr/test/
FILE=""
docker = mysql:5.7
dockerenv =
MYSQL_DATABASE=quay_ci
MYSQL_PASSWORD=quay
MYSQL_ALLOW_EMPTY_PASSWORD=1
MYSQL_USER=quay
whitelist_internals = /bin/sh
# TODO(kleesc): Re-enable buildman tests after buildman rewrite
commands =
python --version
/bin/sh -c "TEST_DATABASE_URI=mysql+pymysql://quay:[email protected]:$MYSQL_3306_TCP_PORT/quay_ci alembic upgrade head"
/bin/sh -c "TEST_DATABASE_URI=mysql+pymysql://quay:[email protected]:$MYSQL_3306_TCP_PORT/quay_ci py.test --timeout=3600 --cov-report=html --cov-report=term-missing -x --color no --verbose --ignore=buildman/ {env:FILE} -vv {posargs}"
[docker:postgres:9.6]
healthcheck_cmd = PGPASSWORD=root psql -U postgres -c "SELECT * FROM pg_extension LIMIT 0;"
healthcheck_interval = 5
healthcheck_timeout = 10
healthcheck_retries = 3
healthcheck_start_period = 10
[testenv:py36-psql]
# TODO(kleesc): Re-enable buildman tests after buildman rewrite
setenv =
PYTHONDONTWRITEBYTECODE = 1
PYTHONPATH={toxinidir}{:}{toxinidir}
TEST=true
SKIP_DB_SCHEMA=true
PYTEST_ADDOPTS=--ignore=endpoints/appr/test/
FILE=""
docker = postgres:9.6
dockerenv =
POSTGRES_DB=quay_ci
POSTGRES_PASSWORD=quay
POSTGRES_USER=quay
whitelist_internals = /bin/sh
# TODO(kleesc): Re-enable buildman tests after buildman rewrite
commands =
python --version
/bin/sh -c "docker exec $(docker ps -q -n 1) psql -U quay -d quay_ci -c 'CREATE EXTENSION IF NOT EXISTS pg_trgm;'"
/bin/sh -c "TEST_DATABASE_URI=postgresql://quay:[email protected]:$POSTGRES_5432_TCP_PORT/quay_ci alembic upgrade head"
/bin/sh -c "TEST_DATABASE_URI=postgresql://quay:[email protected]:$POSTGRES_5432_TCP_PORT/quay_ci py.test --timeout=3600 --cov-report=html --cov-report=term-missing -x --color no --verbose --ignore=buildman/ {env:FILE} -vv {posargs}"