diff --git a/tox.ini b/tox.ini new file mode 100644 index 0000000..d6ff3d3 --- /dev/null +++ b/tox.ini @@ -0,0 +1,56 @@ +[tox] +requires = + tox>=4.2 +env_list = + py313-django40-drf{315, 314} + py313-django50-drf{315, 314} + py313-django51-drf{315, 314} + py312-django40-drf{315, 314} + py312-django50-drf{315, 314} + py312-django51-drf{315, 314} + py311-django40-drf{315, 314} + py311-django50-drf{315, 314} + py311-django51-drf{315, 314} + py310-django40-drf{315, 314} + py310-django50-drf{315, 314} + py310-django51-drf{315, 314} + py39-django40-drf{315, 314} + +[testenv] +description = Run Pytest tests with multiple django and drf versions +deps = + pytest + pytest-cov + pytest-django + django40: django<5.0,>=4.2 + django50: django<5.1,>=5 + django51: django<5.2,>=5.1 + drf314: djangorestframework<3.15,>=3.14 + drf315: djangorestframework<3.16,>=3.15 +commands = + pytest --cov=django_announcement --cov-report=html +develop = True + +[testenv:bandit] +description = Run security checks +skip_install = true +deps = + bandit +commands = + bandit -r django_announcement + +[testenv:pre-commit] +description = Run pre-commit hooks +skip_install = true +deps = + pre-commit +commands = + pre-commit run --all-files + +[gh-actions] +python = + 3.9: py39 + 3.10: py310 + 3.11: py311 + 3.12: py312 + 3.13: py313