Skip to content

Commit

Permalink
Merge pull request #331 from jorenham/tox-config
Browse files Browse the repository at this point in the history
native tox toml config
  • Loading branch information
jorenham authored Oct 15, 2024
2 parents 0268ef0 + 395c169 commit 7570d6d
Showing 1 changed file with 18 additions and 24 deletions.
42 changes: 18 additions & 24 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -327,33 +327,27 @@ line-ending = "lf"
quote-style = "single"

[tool.tox]
legacy_tox_ini = """
[tox]
isolated_build = true
requires = tox>=4
envlist =
repo-review
pre-commit
py{311,312,313}
[testenv]
description = pytest
requires = ["tox>=4.21.2"]
env_list = ["repo-review", "pre-commit", "3.11", "3.12", "3.13"]

[tool.tox.env_run_base]
description = "test with {base_python}"
skip_install = true
allowlist_externals = poetry
commands_pre = poetry install --without debug,docs --sync
commands = poetry run pytest
allowlist_externals = ["poetry"]
commands_pre = [["poetry", "install", "--without=debug,docs"]]
commands = [["poetry", "run", "pytest"]]

[testenv:pre-commit]
description = pre-commit
[tool.tox.env.pre-commit]
description = "pre-commit"
skip_install = true
allowlist_externals = poetry
commands_pre = poetry install --without debug,docs --sync
commands = poetry run pre-commit run --all-files
allowlist_externals = ["poetry"]
commands_pre = [["poetry", "install", "--without=debug,docs", "--extras=typing"]]
commands = [["poetry", "run", "pre-commit", "run", "--all-files"]]

[testenv:repo-review]
description = repo-review
[tool.tox.env.repo-review]
description = "repo-review"
skip_install = true
allowlist_externals = poetry
commands_pre = poetry install --without debug,docs --sync
commands = poetry run repo-review .
"""
allowlist_externals = ["poetry"]
commands_pre = [["poetry", "install", "--without=debug,docs"]]
commands = [["poetry", "run", "repo-review", "."]]

0 comments on commit 7570d6d

Please sign in to comment.