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.

55 lines
1.3 KiB

  1. [tox]
  2. isolated_build = true
  3. skipsdist = true
  4. envlist = check, apply-check, docs, tests, build, changelog
  5. [testenv]
  6. allowlist_externals = poetry, ./test_keycloak_init.sh
  7. commands_pre =
  8. poetry install --sync
  9. [testenv:check]
  10. commands =
  11. black --check --diff src/keycloak tests docs
  12. isort -c --df src/keycloak tests docs
  13. flake8 src/keycloak tests docs
  14. codespell src tests docs
  15. allowlist_externals = black, poetry
  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. allowlist_externals = black, poetry, isort
  22. [testenv:docs]
  23. commands =
  24. sphinx-build -T -E -W -b html -d _build/doctrees -D language=en ./docs/source _build/html
  25. allowlist_externals = sphinx-build, poetry
  26. [testenv:tests]
  27. setenv = file|tox.env
  28. passenv = CONTAINER_HOST,KEYCLOAK_DOCKER_IMAGE_TAG
  29. commands =
  30. ./test_keycloak_init.sh "pytest -vv --cov=keycloak --cov-report term-missing {posargs}"
  31. [testenv:build]
  32. commands =
  33. poetry build --format sdist
  34. poetry build --format wheel
  35. [testenv:changelog]
  36. setenv = file|tox.env
  37. passenv = CONTAINER_HOST
  38. commands =
  39. cz changelog
  40. [flake8]
  41. max-line-length = 99
  42. docstring-convention = all
  43. ignore = D203, D213, W503, E231
  44. docstring_style = sphinx
  45. [darglint]
  46. enable = DAR104