[tox]
isolated_build = true
envlist =
    lint
    {py36}-{django22,django30,django31,djangomaster}
    {py37}-{django22,django30,django31,djangomaster}
    {py38}-{django30,django31,djangomaster}
    docs

[testenv]
setenv =
    PYTHONWARNINGS=all
whitelist_externals =
    make
    poetry
commands =
    poetry install -v
    poetry run coverage run --parallel-mode --source bootstrap4 manage.py test -v1 --noinput
deps =
    django22: Django==2.2.* 
    django30: Django==3.0.* 
    django31: Django==3.1a1
    djangomaster: https://github.com/django/django/archive/master.tar.gz

[testenv:lint]
commands =
    poetry install -v
    poetry run make lint

[testenv:docs]
commands =
    poetry install -v --no-dev --extras docs
    poetry run make docs

[travis]
python :
    3.6: py36
    3.7: py37
    3.8: py38, docs, flake8, coverage-erase, coverage-report

[flake8]
# flake8 does not support pyproject.toml, so we use tox.ini
# E731 do not assign a lambda expression
# W503 line break before binary operator (black introduces these)
# E203 whitespace before ':'
ignore = E731,W503,E203
exclude = .git,.tox,__pycache__
max-line-length = 120
