Browse Source

test: use tox-poetry plugin for tox

pull/354/head
Richard Nemeth 3 years ago
parent
commit
5cd8fc3913
  1. 14
      tox.ini

14
tox.ini

@ -1,13 +1,10 @@
[tox] [tox]
isolated_build = true
requires =
tox-poetry
poetry
envlist = check, apply-check, docs, tests, build envlist = check, apply-check, docs, tests, build
[testenv] [testenv]
install_command = pip install {opts} {packages}
deps =
poetry>=1.1.13
commands_pre =
bash -c "python -m pip install -r <(poetry export --dev --extras=docs --without-hashes --no-interaction)"
whitelist_externals = whitelist_externals =
bash bash
@ -24,16 +21,19 @@ commands =
isort src/keycloak tests docs isort src/keycloak tests docs
[testenv:docs] [testenv:docs]
extras = docs
commands = commands =
sphinx-build -T -E -W -b html -d _build/doctrees -D language=en ./docs/source _build/html sphinx-build -T -E -W -b html -d _build/doctrees -D language=en ./docs/source _build/html
[testenv:tests] [testenv:tests]
setenv = file|tox.env setenv = file|tox.env
passenv = CONTAINER_HOST
commands = commands =
./test_keycloak_init.sh "pytest -vv --cov=keycloak --cov-report term-missing {posargs}" ./test_keycloak_init.sh "pytest -vv --cov=keycloak --cov-report term-missing {posargs}"
[testenv:build] [testenv:build]
commands_pre =
deps =
poetry
setenv = setenv =
POETRY_VIRTUALENVS_CREATE = false POETRY_VIRTUALENVS_CREATE = false
commands = commands =

Loading…
Cancel
Save