[tox]
envlist =
    py{35,36,37,38}-django{22,30}
    lint
    sandbox
    docs


[testenv]
commands = coverage run --parallel -m pytest {posargs}
extras = test
pip_pre = true
deps =
    django22: django>=2.2,<2.3
    django30: django>=3.0,<3.1


[testenv:lint]
basepython = python3.7
deps =
    flake8
    isort
commands =
    npm ci
    flake8 src tests setup.py
    isort -c -q --recursive --diff src/ tests/
    npm run eslint
    django-admin.py compilemessages


[testenv:sandbox]
basepython = python3.7
deps =
    -r{toxinidir}/requirements.txt
    django>=2.2,<2.3
whitelist_externals = make
commands =
    make build_sandbox

[testenv:docs]
basepython = python3.7
whitelist_externals = make
changedir = {toxinidir}/docs
pip_pre = false
deps =
    -r{toxinidir}/docs/requirements.txt
commands =
    make html

[tox]
envlist =
    py{35,36,37,38}-django{22,30}
    lint
    sandbox
    docs


[testenv]
commands = coverage run --parallel -m pytest {posargs}
extras = test
pip_pre = true
deps =
    django22: django>=2.2,<2.3
    django30: django>=3.0,<3.1


[testenv:lint]
basepython = python3.7
deps =
    -r{toxinidir}/requirements.txt
commands =
    npm ci
    flake8 src tests setup.py
    isort -c -q --recursive --diff src/ tests/
    npm run eslint
    django-admin.py compilemessages


[testenv:sandbox]
basepython = python3.7
deps =
    -r{toxinidir}/requirements.txt
    django>=2.2,<2.3
whitelist_externals = make
commands =
    make build_sandbox

[testenv:docs]
basepython = python3.7
whitelist_externals = make
changedir = {toxinidir}/docs
pip_pre = false
deps =
    -r{toxinidir}/docs/requirements.txt
commands =
    make html

Use requirements.txt for lint dependencies so that they are pinned.
Use requirements.txt for lint dependencies so that they are pinned.
