Skip to content

Instantly share code, notes, and snippets.

@Tbruno25
Created April 5, 2023 17:32
Show Gist options
  • Save Tbruno25/2f92db0c337a79bfdbe0196b7b9a1a28 to your computer and use it in GitHub Desktop.
Save Tbruno25/2f92db0c337a79bfdbe0196b7b9a1a28 to your computer and use it in GitHub Desktop.
Single tox config for multiple packages
[tox]
requires = tox>=4.4.10
isolated_build = true
pass_env = PWD
tox_root = {env:PWD}
env_list =
coverage
lint
test
type
py37
py38
py39
py310
py311
[testenv]
allowlist_externals = poetry
commands_pre =
poetry install --quiet --only dev
[testenv:lint]
deps = pre-commit
commands =
pre-commit run --all-files --show-diff-on-failure
[testenv:test]
commands =
coverage run --omit="*tests*" -m pytest {env:PWD}/tests -v --color=yes
coverage report -m
[testenv:type]
commands =
mypy {env:PWD} --pretty
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment