Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

split tox config #451

Merged
merged 1 commit into from
Dec 9, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
43 changes: 0 additions & 43 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -12,46 +12,3 @@ target-version = "py38"
[tool.ruff.lint]
select = ["B", "C4", "E", "F", "I", "T10", "YTT", "W"]

[tool.tox]
legacy_tox_ini = """
[tox]
min_version = 4.4
envlist =
{py38,py39,py310,py311,py312}-django420-{end2end,unittests}
{py310,py311,py312}-django{500,510}-{end2end,unittests}
py39-lint

[gh-actions]
python =
3.8: py38
3.9: py39, py39-lint
3.10: py310
3.11: py311
3.12: py312

[testenv]
deps =
django420: Django>=4.2,<4.3
django500: Django>=5.0,<5.1
django510: Django>=5.1,<5.2
coverage
-rrequirements.txt
skip_missing_interpreters=true

changedir =
end2end: {toxinidir}/django_prometheus/tests/end2end
setenv =
end2end: PYTHONPATH = {toxinidir}
end2end: DJANGO_SETTINGS_MODULE=testapp.settings
commands =
end2end: coverage run --source=django_prometheus -m pytest testapp/
unittests: coverage run --source=django_prometheus setup.py test
unittests: python setup.py sdist bdist_wheel

[testenv:py39-lint]
deps =
ruff==0.8.2
commands =
ruff format --check django_prometheus/
ruff check django_prometheus/
"""
40 changes: 40 additions & 0 deletions tox.ini
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
[tox]
min_version = 4.4
envlist =
{py38,py39,py310,py311,py312}-django420-{end2end,unittests}
{py310,py311,py312}-django{500,510}-{end2end,unittests}
py39-lint

[gh-actions]
python =
3.8: py38
3.9: py39, py39-lint
3.10: py310
3.11: py311
3.12: py312

[testenv]
deps =
django420: Django>=4.2,<4.3
django500: Django>=5.0,<5.1
django510: Django>=5.1,<5.2
coverage
-rrequirements.txt
skip_missing_interpreters=true

changedir =
end2end: {toxinidir}/django_prometheus/tests/end2end
setenv =
end2end: PYTHONPATH = {toxinidir}
end2end: DJANGO_SETTINGS_MODULE=testapp.settings
commands =
end2end: coverage run --source=django_prometheus -m pytest testapp/
unittests: coverage run --source=django_prometheus setup.py test
unittests: python setup.py sdist bdist_wheel

[testenv:py39-lint]
deps =
ruff==0.8.2
commands =
ruff format --check django_prometheus/
ruff check django_prometheus/