# Tox (http://tox.testrun.org/) is a tool for running tests
# in multiple virtualenvs. This configuration file will run the
# test suite on all supported python versions. To use it, "pip install tox"
# and then run "tox" from this directory.

[tox]
envlist =
	precommit
	safety
	mypy
	{py27,py34,py35,py36,py37}-flake8
	{py27,py34,py35,py36,py37,pypy}-dj111
	{py34,py35,py36,py37,pypy}-dj20
	{py35,py36,py37,pypy}-dj21
	{py35,py36,py37,pypy}-djmaster

[testenv]
commands = make test
whitelist_externals = make

deps =
	dj111: Django>=1.11,<2.0
	dj20: Django>=2.0,<2.1
	dj21: Django>=2.1,<2.2
	djmaster: https://github.com/django/django/archive/master.tar.gz
	shortuuid
	werkzeug
	django_pdb
	python-dateutil
	pytest-django
	pytest-cov
	py27: python-keyczar
	mock

[testenv:precommit]
deps =
	pre-commit
commands = pre-commit run -a

[testenv:safety]
deps =
	safety
commands = safety check --full-report

[testenv:mypy]
deps =
	mypy
commands = mypy --ignore-missing-imports django_extensions

[testenv:compile-catalog]
whitelist_externals =
	make
deps =
	Babel
commands =
	make compile-catalog

[testenv:py27-flake8]
deps =
	flake8
commands = flake8 django_extensions tests

[testenv:py34-flake8]
deps =
	flake8
commands = flake8 django_extensions tests

[testenv:py35-flake8]
deps =
	flake8
commands = flake8 django_extensions tests

[testenv:py36-flake8]
deps =
	flake8
commands = flake8 django_extensions tests

[testenv:py37-flake8]
deps =
	flake8
commands = flake8 django_extensions tests
