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