Skip to content

Commit

Permalink
🔧 chore: Add tox.ini config
Browse files Browse the repository at this point in the history
- Test with multi python version
- exc bandit for security
- exc pre-commit hooks
  • Loading branch information
ARYAN-NIKNEZHAD committed Oct 25, 2024
1 parent 399beb1 commit cf9666d
Showing 1 changed file with 56 additions and 0 deletions.
56 changes: 56 additions & 0 deletions tox.ini
Original file line number Diff line number Diff line change
@@ -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

0 comments on commit cf9666d

Please sign in to comment.