tox.ini 1.8 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364
  1. [tox]
  2. envlist = py36,py38,py310
  3. # isolated_build = True
  4. # requires = [-rrequirements.txt]
  5. [testenv]
  6. passenv = USERNAME
  7. deps =
  8. -rrequirements.txt
  9. pytest
  10. # change pytest tempdir and add posargs from command line
  11. commands = pytest --pyargs redmail -r chars
  12. [testenv:minimal]
  13. passenv = USERNAME
  14. deps =
  15. pytest
  16. # change pytest tempdir and add posargs from command line
  17. commands = pytest --pyargs redmail -r chars
  18. [testenv:wheeltest]
  19. passenv = USERNAME
  20. description = Build and install the wheel and run Pytests in it.
  21. deps =
  22. pytest
  23. skip_install = True
  24. commands =
  25. # /bin/rm -rf build
  26. python setup.py bdist_wheel
  27. pip install --upgrade --find-links={toxinidir}/dist redmail
  28. pytest --pyargs redmail -r chars
  29. [testenv:docs]
  30. description = invoke sphinx-build to build the HTML docs
  31. basepython = python3.8
  32. deps =
  33. -r{toxinidir}/requirements/docs.txt
  34. commands = sphinx-build docs "{toxinidir}/docs/_build/html" --color -W -bhtml {posargs}
  35. sphinx-build -b doctest docs "{toxinidir}/docs/_build/html"
  36. python -c 'import pathlib; print("documentation available under file://\{0\}".format(pathlib.Path(r"{toxworkdir}") / "docs_out" / "index.html"))'
  37. [testenv:build]
  38. description = build the package.
  39. skip_install = true
  40. # install_command = pip install --upgrade build
  41. commands = python setup.py bdist_wheel sdist
  42. [testenv:release]
  43. description = build and release the package.
  44. skip_install = true
  45. deps =
  46. twine
  47. # install_command = pip install --upgrade build
  48. commands = python setup.py bdist_wheel sdist
  49. twine upload dist/*
  50. [testenv:release-test]
  51. description = build and release the package.
  52. skip_install = true
  53. deps =
  54. twine
  55. # install_command = pip install --upgrade build
  56. commands = python setup.py bdist_wheel sdist
  57. twine upload -r testpypi dist/*