]> git.phdru.name Git - sqlconvert.git/blob - tox.ini
Build, Tests(tox): Python 3.7
[sqlconvert.git] / tox.ini
1 [tox]
2 minversion = 2.0
3 envlist = py{27,34,35,36,37}{,-sqlite},py{27,34}-flake8
4
5 # Base test environment settings
6 [testenv]
7 basepython =
8     py27: {env:TOXPYTHON:python2.7}
9     py34: {env:TOXPYTHON:python3.4}
10     py35: {env:TOXPYTHON:python3.5}
11     py36: {env:TOXPYTHON:python3.6}
12     py37: {env:TOXPYTHON:python3.7}
13 commands =
14     {envpython} --version
15     {envpython} -c "import struct; print(struct.calcsize('P') * 8)"
16 deps =
17     -rdevscripts/requirements/requirements_tests.txt
18     postgres: psycopg2-binary
19 passenv = PGPASSWORD
20 platform = linux
21 # Don't fail or warn on uninstalled commands
22 whitelist_externals =
23     createdb
24     dropdb
25
26 [general]
27 commands =
28     {[testenv]commands}
29     {envpython} -m pytest --cov=sqlconvert
30     {envpython} {envbindir}/mysql2sql -P demo/demo.sql test.out
31     cmp.py -i tests/mysql2sql/test.out test.out
32     rm.py -f test.out
33
34 [testenv:py27]
35 commands = {[general]commands}
36
37 [testenv:py34]
38 commands = {[general]commands}
39
40 [testenv:py35]
41 commands = {[general]commands}
42
43 [testenv:py36]
44 commands = {[general]commands}
45
46 [testenv:py37]
47 commands = {[general]commands}
48
49 # PostgreSQL test environments
50 [postgresql]
51 commands =
52     {[testenv]commands}
53     -dropdb -U postgres -w test
54     createdb -U postgres -w test
55     {envpython} -m pytest --cov=sqlconvert -D postgres://postgres:@localhost/test
56     dropdb -U postgres -w test
57
58 [testenv:py27-postgres]
59 commands = {[postgresql]commands}
60
61 [testenv:py34-postgres]
62 commands = {[postgresql]commands}
63
64 [testenv:py35-postgres]
65 commands = {[postgresql]commands}
66
67 [testenv:py36-postgres]
68 commands = {[postgresql]commands}
69
70 [testenv:py37-postgres]
71 commands = {[postgresql]commands}
72
73 [postgres-w32]
74 platform = win32
75 commands =
76     {[testenv]commands}
77     -dropdb -U postgres -w test
78     createdb -U postgres -w test
79     pytest --cov=sqlconvert -D "postgres://postgres:Password12!@localhost/test"
80     dropdb -U postgres -w test
81
82 [testenv:py27-postgres-w32]
83 platform = win32
84 commands = {[postgres-w32]commands}
85
86 [testenv:py34-postgres-w32]
87 platform = win32
88 commands = {[postgres-w32]commands}
89
90 [testenv:py35-postgres-w32]
91 platform = win32
92 commands = {[postgres-w32]commands}
93
94 [testenv:py36-postgres-w32]
95 platform = win32
96 commands = {[postgres-w32]commands}
97
98 [testenv:py37-postgres-w32]
99 platform = win32
100 commands = {[postgres-w32]commands}
101
102 # SQLite test environments
103 [sqlite]
104 commands =
105     {[testenv]commands}
106     -rm.py -f /tmp/test.sqdb
107     {envpython} -m pytest --cov=sqlconvert -D sqlite:///tmp/test.sqdb
108     rm.py -f /tmp/test.sqdb
109
110 [testenv:py27-sqlite]
111 commands = {[sqlite]commands}
112
113 [testenv:py34-sqlite]
114 commands = {[sqlite]commands}
115
116 [testenv:py35-sqlite]
117 commands = {[sqlite]commands}
118
119 [testenv:py36-sqlite]
120 commands = {[sqlite]commands}
121
122 [testenv:py37-sqlite]
123 commands = {[sqlite]commands}
124
125 [sqlite-w32]
126 platform = win32
127 commands =
128     {[testenv]commands}
129     -rm.py -f C:/projects/sqlconvert/test.sqdb
130     pytest --cov=sqlconvert -D sqlite:/C:/projects/sqlconvert/test.sqdb?debug=1
131     rm.py -f C:/projects/sqlconvert/test.sqdb
132
133 [testenv:py27-sqlite-w32]
134 platform = win32
135 commands = {[sqlite-w32]commands}
136
137 [testenv:py34-sqlite-w32]
138 platform = win32
139 commands = {[sqlite-w32]commands}
140
141 [testenv:py35-sqlite-w32]
142 platform = win32
143 commands = {[sqlite-w32]commands}
144
145 [testenv:py36-sqlite-w32]
146 platform = win32
147 commands = {[sqlite-w32]commands}
148
149 [testenv:py37-sqlite-w32]
150 platform = win32
151 commands = {[sqlite-w32]commands}
152
153 # flake8
154 [testenv:py27-flake8]
155 deps =
156     flake8
157 commands =
158     {[testenv]commands}
159     flake8
160
161 [testenv:py34-flake8]
162 deps =
163     flake8
164 commands =
165     {[testenv]commands}
166     flake8