tox.ini 1020 B

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657
  1. [tox]
  2. envlist = py37,py39,pre-commit
  3. [testenv]
  4. usedevelop=True
  5. whitelist_externals=mkdir
  6. passenv =
  7. LD_LIBRARY_PATH
  8. DOCKER_HOST
  9. DOCKER_CERT_PATH
  10. DOCKER_TLS_VERIFY
  11. DOCKER_VERSION
  12. SWARM_SKIP_*
  13. SWARM_ASSUME_MULTINODE
  14. setenv =
  15. HOME=/tmp
  16. deps =
  17. -rrequirements-indirect.txt
  18. -rrequirements.txt
  19. -rrequirements-dev.txt
  20. commands =
  21. mkdir -p .coverage-binfiles
  22. py.test -v \
  23. --cov=compose \
  24. --cov-report html \
  25. --cov-report term \
  26. --cov-config=tox.ini \
  27. {posargs:tests}
  28. [testenv:pre-commit]
  29. skip_install = True
  30. deps =
  31. pre-commit
  32. commands =
  33. pre-commit install
  34. pre-commit run --all-files --show-diff-on-failure
  35. # Coverage configuration
  36. [run]
  37. branch = True
  38. data_file = .coverage-binfiles/.coverage
  39. [report]
  40. show_missing = true
  41. [html]
  42. directory = coverage-html
  43. # end coverage configuration
  44. [flake8]
  45. max-line-length = 105
  46. # Set this high for now
  47. max-complexity = 12
  48. exclude = compose/packages
  49. [pytest]
  50. addopts = --tb=short -rxs