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.

54 lines
1.2 KiB

12 months ago
  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. [testenv:apply-check]
  16. commands =
  17. black -C src/keycloak tests docs
  18. black src/keycloak tests docs
  19. isort src/keycloak tests docs
  20. [testenv:docs]
  21. commands_pre =
  22. poetry install --no-root --sync -E 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,KEYCLOAK_DOCKER_IMAGE_TAG
  28. commands =
  29. ./test_keycloak_init.sh "pytest -vv --cov=keycloak --cov-report term-missing {posargs}"
  30. [testenv:build]
  31. commands =
  32. poetry build --format sdist
  33. poetry build --format wheel
  34. [testenv:changelog]
  35. setenv = file|tox.env
  36. passenv = CONTAINER_HOST
  37. commands =
  38. cz changelog
  39. [flake8]
  40. max-line-length = 99
  41. docstring-convention = all
  42. ignore = D203, D213, W503, E231
  43. docstring_style = sphinx
  44. [darglint]
  45. enable = DAR104