Skip to content

Commit

Permalink
Add tox testing
Browse files Browse the repository at this point in the history
  • Loading branch information
ElliottKasoar authored and alinelena committed Feb 13, 2024
1 parent 781095b commit c712bbc
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 0 deletions.
1 change: 1 addition & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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]
Expand Down
23 changes: 23 additions & 0 deletions tox.ini
Original file line number Diff line number Diff line change
@@ -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

0 comments on commit c712bbc

Please sign in to comment.