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.

57 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_pre =
  24. poetry install --no-root --sync -E docs
  25. commands =
  26. sphinx-build -T -E -W -b html -d _build/doctrees -D language=en ./docs/source _build/html
  27. allowlist_externals = sphinx-build, poetry
  28. [testenv:tests]
  29. setenv = file|tox.env
  30. passenv = CONTAINER_HOST,KEYCLOAK_DOCKER_IMAGE_TAG
  31. commands =
  32. ./test_keycloak_init.sh "pytest -vv --cov=keycloak --cov-report term-missing {posargs}"
  33. [testenv:build]
  34. commands =
  35. poetry build --format sdist
  36. poetry build --format wheel
  37. [testenv:changelog]
  38. setenv = file|tox.env
  39. passenv = CONTAINER_HOST
  40. commands =
  41. cz changelog
  42. [flake8]
  43. max-line-length = 99
  44. docstring-convention = all
  45. ignore = D203, D213, W503, E231
  46. docstring_style = sphinx
  47. [darglint]
  48. enable = DAR104