tox.ini 1.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566
  1. # Tox (https://tox.readthedocs.io/) is a tool for running tests in multiple
  2. # virtualenvs. This configuration file helps to run the test suite on all
  3. # supported Python versions. To use it, "pip install tox" and then run "tox"
  4. # from this directory.
  5. [tox]
  6. skipsdist = true
  7. envlist =
  8. py3
  9. flake8
  10. docs
  11. isort
  12. # Add environment to use the default python3 installation
  13. [testenv:py3]
  14. basepython = python3
  15. [testenv]
  16. usedevelop = true
  17. passenv = DJANGO_SETTINGS_MODULE PYTHONPATH HOME DISPLAY
  18. setenv =
  19. PYTHONDONTWRITEBYTECODE=1
  20. deps =
  21. py{3,34,35,36}: -rtests/requirements/py3.txt
  22. postgres: -rtests/requirements/postgres.txt
  23. mysql: -rtests/requirements/mysql.txt
  24. oracle: -rtests/requirements/oracle.txt
  25. changedir = tests
  26. commands =
  27. {envpython} runtests.py {posargs}
  28. [testenv:flake8]
  29. basepython = python3
  30. usedevelop = false
  31. deps = flake8
  32. changedir = {toxinidir}
  33. commands = flake8 .
  34. [testenv:docs]
  35. basepython = python3
  36. usedevelop = false
  37. whitelist_externals =
  38. make
  39. deps =
  40. Sphinx
  41. pyenchant
  42. sphinxcontrib-spelling
  43. changedir = docs
  44. commands =
  45. make spelling
  46. [testenv:isort]
  47. basepython = python3
  48. usedevelop = false
  49. deps = isort
  50. changedir = {toxinidir}
  51. commands = isort --recursive --check-only --diff django tests scripts
  52. [testenv:javascript]
  53. usedevelop = false
  54. deps =
  55. changedir = {toxinidir}
  56. whitelist_externals = npm
  57. commands =
  58. npm install
  59. npm test