]> git.phdru.name Git - sqlconvert.git/blob - tox.ini
Add release script
[sqlconvert.git] / tox.ini
1 [tox]
2 minversion = 1.8
3 envlist = {py26,py27,py34,py35,py36},{py26,py27,py34,py35,py36}-{postgres,sqlite},{py27,py34}-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 commands =
13     {envpython} --version
14     {envpython} -c "import struct; print(struct.calcsize('P') * 8)"
15 deps =
16     pytest
17     pytest-cov
18     py26: argparse
19     sqlparse
20     py2{6,7}: SQLObject>=2.2.1
21     py3{4,5,6}: SQLObject>=3.0.0
22     m_lib>=3.1
23     m_lib.defenc>=1.0
24     ppu
25     postgres: psycopg2
26 sitepackages = True
27 # Don't fail or warn on uninstalled commands
28 whitelist_externals =
29     flake8
30     createdb
31     dropdb
32
33 [general]
34 commands =
35     {[testenv]commands}
36     {envpython} -m pytest --cov=sqlconvert
37     {envpython} {envbindir}/mysql2sql -P demo/demo.sql test.out
38     {envpython} {envbindir}/cmp.py -i tests/mysql2sql/test.out test.out
39     {envpython} {envbindir}/rm.py test.out
40
41 [testenv:py26]
42 commands = {[general]commands}
43
44 [testenv:py27]
45 commands = {[general]commands}
46
47 [testenv:py34]
48 commands = {[general]commands}
49
50 [testenv:py35]
51 commands = {[general]commands}
52
53 [testenv:py36]
54 commands = {[general]commands}
55
56 # PostgreSQL test environments
57 [postgresql]
58 commands =
59     {[testenv]commands}
60     -dropdb test
61     createdb test
62     {envpython} -m pytest --cov=sqlconvert -D postgres:///test
63     dropdb test
64
65 [testenv:py26-postgres]
66 commands = {[postgresql]commands}
67
68 [testenv:py27-postgres]
69 commands = {[postgresql]commands}
70
71 [testenv:py34-postgres]
72 commands = {[postgresql]commands}
73
74 [testenv:py35-postgres]
75 commands = {[postgresql]commands}
76
77 [testenv:py36-postgres]
78 commands = {[postgresql]commands}
79
80 # SQLite test environments
81 [sqlite]
82 commands =
83     {[testenv]commands}
84     -{envpython} {envbindir}/rm.py /tmp/test.sqdb
85     {envpython} -m pytest --cov=sqlconvert -D sqlite:///tmp/test.sqdb
86     {envpython} {envbindir}/rm.py /tmp/test.sqdb
87
88 [testenv:py26-sqlite]
89 commands = {[sqlite]commands}
90
91 [testenv:py27-sqlite]
92 commands = {[sqlite]commands}
93
94 [testenv:py34-sqlite]
95 commands = {[sqlite]commands}
96
97 [testenv:py35-sqlite]
98 commands = {[sqlite]commands}
99
100 [testenv:py36-sqlite]
101 commands = {[sqlite]commands}
102
103 # flake8
104 [testenv:py27-flake8]
105 deps =
106     flake8
107 commands =
108     {[testenv]commands}
109     flake8
110
111 [testenv:py34-flake8]
112 deps =
113     flake8
114 commands =
115     {[testenv]commands}
116     flake8