]> git.phdru.name Git - sqlconvert.git/blob - tox.ini
CI(GHActions): Python 3.10
[sqlconvert.git] / tox.ini
1 [tox]
2 minversion = 3.15
3 envlist = py27,py3{4,5,6,7,8,9,10}{,-sqlite},py{27,39}-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     py39: {env:TOXPYTHON:python3.9}
15     py310: {env:TOXPYTHON:python3.10}
16 commands =
17     {envpython} --version
18     {envpython} -c "import struct; print(struct.calcsize('P') * 8)"
19 deps =
20     -rdevscripts/requirements/requirements_tests.txt
21     postgres: psycopg2-binary
22 passenv = PGPASSWORD
23 platform = linux|win32
24 # Don't fail or warn on uninstalled commands
25 whitelist_externals =
26     createdb
27     dropdb
28
29 [testenv:{py27,py34,py35,py36,py37,py38,py39,py310}]
30 commands =
31     {[testenv]commands}
32     {envpython} -m pytest
33     {envpython} {envbindir}/mysql2sql -P demo/demo.sql test.out
34     cmp.py -i tests/mysql2sql/test.out test.out
35     rm.py -f test.out
36
37 [testenv:{py27,py34,py35,py36,py37,py38,py39,py310}-sqlite]
38 commands =
39     {[testenv]commands}
40     -rm.py -f /tmp/test.sqdb
41     {envpython} -m pytest -D sqlite:///tmp/test.sqdb
42     rm.py -f /tmp/test.sqdb
43
44 [testenv:{py27,py34,py35,py36,py37,py38,py39,py310}-sqlite-w32]
45 platform = win32
46 commands =
47     {[testenv]commands}
48     -rm.py -f {env:TEMP}/test.sqdb
49     pytest -D sqlite:/{env:TEMP}/test.sqdb?debug=1
50     rm.py -f {env:TEMP}/test.sqdb
51
52 [testenv:{py27,py34,py35,py36,py37,py38,py39,py310}-postgres{,-w32}]
53 commands =
54     {[testenv]commands}
55     -dropdb --username=runner test
56     createdb --username=runner test
57     {envpython} -m pytest -D postgres://runner:test@localhost/test
58     dropdb --username=runner test
59
60 # flake8
61 [testenv:{py27,py34,py35,py36,py37,py38,py39,py310}-flake8]
62 deps =
63     flake8
64 commands =
65     {[testenv]commands}
66     flake8