forked from Kotti/Kotti
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtox.ini
30 lines (29 loc) · 1.17 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
[tox]
envlist = {py36,py37,p38}-{postgresql,sqlite,mysql}
[testenv]
deps =
postgresql: psycopg2-binary
mysql: mysqlclient
envdir:
py36: {toxworkdir}/3.6
py37: {toxworkdir}/3.7
py38: {toxworkdir}/3.8
setenv:
sqlite: KOTTI_TEST_DB_STRING=sqlite://
py35-mysql: KOTTI_TEST_DB_STRING=mysql://root@localhost:3306/kotti_testing
py36-mysql: KOTTI_TEST_DB_STRING=mysql://root@localhost:3306/kotti_testing
py37-mysql: KOTTI_TEST_DB_STRING=mysql://root@localhost:3306/kotti_testing
py35-postgresql: KOTTI_TEST_DB_STRING=postgresql://127.0.0.1:5432/kotti_testing
py36-postgresql: KOTTI_TEST_DB_STRING=postgresql://127.0.0.1:5432/kotti_testing
py37-postgresql: KOTTI_TEST_DB_STRING=postgresql://127.0.0.1:5432/kotti_testing
install_command: pip install {opts} {packages}
whitelist_externals =
mysql
psql
commands =
postgresql: psql -U postgres -c 'CREATE DATABASE kotti_testing;'
mysql: mysql -u root -e 'CREATE DATABASE kotti_testing CHARACTER SET utf8 COLLATE utf8_general_ci;'
pip install -e .[testing]
pytest
postgresql: psql -U postgres -c 'DROP DATABASE kotti_testing;'
mysql: mysql -u root -e 'DROP DATABASE kotti_testing;'