[tox]
envlist =
    py36-django{22,30,31,32},
    py37-django{22,30,31,32},
    py38-django{22,30,31,32},
    py39-django{22,30,31,32},
    pypy3-django{22,30,31,32},
    packaging,

[testenv]
usedevelop = true
deps =
    coverage
    djangorestframework
    django22: Django~=2.2
    django31: Django~=3.1
    django32: Django~=3.2
commands =
    py{36,37,38,39},pypy3: coverage run tests/manage.py test testsuite {posargs: -v 2}
    py{36,37,38,39},pypy3: coverage report -m

[testenv:packaging]
usedevelop = false
deps =
    django
    djangorestframework
commands =
    {envpython} tests/manage.py test testsuite {posargs: -v 2}

[testenv:djangomain]
deps =
    https://github.com/django/django/archive/main.tar.gz#egg=django
    djangorestframework
commands =
    {envpython} tests/manage.py test testsuite {posargs: -v 2}
