1# Tox (http://tox.testrun.org/) is a tool for running tests
2# in multiple virtualenvs. This configuration file will run the
3# test suite on all supported python versions. To use it, "pip install tox"
4# and then run "tox" from this directory.
5
6[tox]
7envlist = py27, py38, flake8, pylint, yapf
8
9[testenv:py27]
10whitelist_externals = rm
11commands = rm -rf htmlcov
12           coverage erase
13           coverage run -p --include=pgmigrate.py {envbindir}/behave -q
14           coverage combine
15           coverage html pgmigrate.py
16           coverage report --fail-under=100 pgmigrate.py
17deps = behave
18       importlib
19       coverage
20       func_timeout
21
22[testenv:py38]
23whitelist_externals = rm
24commands = rm -rf htmlcov
25           coverage erase
26           coverage run -p --include=pgmigrate.py {envbindir}/behave -q
27           coverage combine
28           coverage html pgmigrate.py
29           coverage report --fail-under=100 pgmigrate.py
30deps = behave
31       coverage
32       func_timeout
33
34[testenv:flake8]
35commands = flake8 pgmigrate.py setup.py
36deps = flake8
37       flake8-mock
38       flake8-string-format
39       flake8-isort
40       flake8-commas
41       flake8-quotes
42       flake8-copyright
43       flake8-pep3101
44
45[testenv:pylint]
46commands = pylint pgmigrate.py
47deps = pylint
48
49[testenv:yapf]
50commands = yapf -pd pgmigrate.py
51deps = yapf==0.29.0
52
53[flake8]
54copyright-check = True
55select = E,F,W,C
56copyright-regexp = Copyright\s+(\(C\)\s+)?(\d{4}-)?2016-2020\s+%(author)s
57copyright-author = Yandex LLC
58