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.

50 lines
1.1 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 sync
  9. [testenv:check]
  10. commands =
  11. ruff check src/keycloak tests docs
  12. ruff format --check src/keycloak tests docs
  13. codespell src tests docs
  14. [testenv:apply-check]
  15. commands =
  16. ruff check --fix src/keycloak tests docs
  17. ruff format src/keycloak tests docs
  18. [testenv:docs]
  19. commands =
  20. sphinx-build -T -E -W -b html -d _build/doctrees -D language=en ./docs/source _build/html
  21. [testenv:tests]
  22. setenv = file|tox.env
  23. passenv = CONTAINER_HOST,KEYCLOAK_DOCKER_IMAGE_TAG
  24. commands =
  25. ./test_keycloak_init.sh "pytest -vv --cov=keycloak --cov-report term-missing {posargs}"
  26. [testenv:build]
  27. commands =
  28. poetry build --format sdist
  29. poetry build --format wheel
  30. [testenv:changelog]
  31. setenv = file|tox.env
  32. passenv = CONTAINER_HOST
  33. commands =
  34. cz changelog
  35. [flake8]
  36. max-line-length = 99
  37. docstring-convention = all
  38. ignore = D203, D213, W503, E231
  39. docstring_style = sphinx
  40. [darglint]
  41. enable = DAR104