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.

58 lines
1.1 KiB

  1. [tox]
  2. requires =
  3. tox-poetry
  4. poetry
  5. tox<4.0.0
  6. envlist = check, apply-check, docs, tests, build, changelog
  7. [testenv]
  8. whitelist_externals =
  9. bash
  10. [testenv:check]
  11. commands =
  12. black --check --diff src/keycloak tests docs
  13. isort -c --df src/keycloak tests docs
  14. flake8 src/keycloak tests docs
  15. codespell src tests docs
  16. [testenv:apply-check]
  17. commands =
  18. black -C src/keycloak tests docs
  19. black src/keycloak tests docs
  20. isort src/keycloak tests docs
  21. [testenv:docs]
  22. extras = 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. passenv = CONTAINER_HOST
  28. commands =
  29. ./test_keycloak_init.sh "pytest -vv --cov=keycloak --cov-report term-missing {posargs}"
  30. [testenv:build]
  31. deps =
  32. poetry
  33. setenv =
  34. POETRY_VIRTUALENVS_CREATE = false
  35. commands =
  36. poetry build --format sdist
  37. poetry build --format wheel
  38. [testenv:changelog]
  39. setenv = file|tox.env
  40. passenv = CONTAINER_HOST
  41. commands =
  42. cz changelog
  43. [flake8]
  44. max-line-length = 99
  45. docstring-convention = all
  46. ignore = D203, D213, W503
  47. docstring_style = sphinx
  48. [darglint]
  49. enable = DAR104