You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

44 lines
1.0 KiB

  1. [tox]
  2. isolated_build = true
  3. envlist = check, apply-check, docs, tests, build
  4. [testenv]
  5. install_command = pip install {opts} {packages}
  6. deps =
  7. poetry>=1.1.13
  8. commands_pre =
  9. bash -c "python -m pip install -r <(poetry export --dev --extras=docs --without-hashes --no-interaction)"
  10. whitelist_externals =
  11. bash
  12. [testenv:check]
  13. commands =
  14. black --check --diff src/keycloak tests docs
  15. isort -c --df src/keycloak tests docs
  16. flake8 src/keycloak tests docs
  17. [testenv:apply-check]
  18. commands =
  19. black -C src/keycloak tests docs
  20. black src/keycloak tests docs
  21. isort src/keycloak tests docs
  22. [testenv:docs]
  23. commands =
  24. sphinx-build -T -E -W -b html -d _build/doctrees -D language=en ./docs/source _build/html
  25. [testenv:tests]
  26. setenv = file|tox.env
  27. commands =
  28. ./test_keycloak_init.sh "pytest -vv --cov=keycloak --cov-report term-missing {posargs}"
  29. [testenv:build]
  30. commands_pre =
  31. setenv =
  32. POETRY_VIRTUALENVS_CREATE = false
  33. commands =
  34. poetry build --format sdist
  35. poetry build --format wheel
  36. [flake8]
  37. max-line-length = 99