From 42762d101c884c37fc0bfef3bed868499ea3ded2 Mon Sep 17 00:00:00 2001 From: ElliottKasoar Date: Fri, 9 Feb 2024 12:49:56 +0000 Subject: [PATCH] Add tox testing --- pyproject.toml | 1 + tox.ini | 23 +++++++++++++++++++++++ 2 files changed, 24 insertions(+) create mode 100644 tox.ini diff --git a/pyproject.toml b/pyproject.toml index d3df1257..391d356c 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -31,6 +31,7 @@ coverage = {extras = ["toml"], version = "^7.4.1"} pgtest = "^1.3.2" pytest = "^8.0" pytest-cov = "^4.1.0" +tox = "^4.12.1" wheel = "^0.42" [tool.poetry.group.pre-commit] diff --git a/tox.ini b/tox.ini new file mode 100644 index 00000000..595fd876 --- /dev/null +++ b/tox.ini @@ -0,0 +1,23 @@ +[tox] +envlist = py311 + +[testenv] +usedevelop=True + +[testenv:py{39,310,311,312}] +description = Run the test suite against Python versions +allowlist_externals = poetry +commands_pre = poetry install --no-root --sync +commands = poetry run pytest --cov janus_core --import-mode importlib + +[testenv:pre-commit] +description = Run the pre-commit checks +allowlist_externals = poetry +commands_pre = poetry install --no-root --sync +commands = poetry run pre-commit run {posargs} --all-files + +[testenv:docs] +description = Build the documentation +allowlist_externals = poetry, echo +commands_pre = poetry install --no-root --sync +commands = poetry run sphinx-build -nW --keep-going -b html {posargs} docs/source docs/build/html