Skip to content

Commit

Permalink
Add tox testing
Browse files Browse the repository at this point in the history
  • Loading branch information
ElliottKasoar committed Feb 9, 2024
1 parent 749acb2 commit 56fcb53
Show file tree
Hide file tree
Showing 2 changed files with 27 additions and 0 deletions.
1 change: 1 addition & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,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
26 changes: 26 additions & 0 deletions tox.ini
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
[tox]
envlist = py310

[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
#commands = coverage run -m pytest --cov=janus_core
#commands = pytest {posargs:tests}
#commands = pytest tests/

[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
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 56fcb53

Please sign in to comment.