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.

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