1
0

tox.ini 2.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071
  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. commands = pip install .[docs]
  33. sphinx-build docs "{toxinidir}/docs/_build/html" --color -W -bhtml {posargs}
  34. sphinx-build -b doctest docs "{toxinidir}/docs/_build/html"
  35. python -c 'import pathlib; print("documentation available under file://\{0\}".format(pathlib.Path(r"{toxworkdir}") / "docs_out" / "index.html"))'
  36. [testenv:build]
  37. description = build the package.
  38. skip_install = true
  39. # install_command = pip install --upgrade build
  40. commands = python setup.py bdist_wheel sdist
  41. [testenv:release]
  42. description = build and release the package.
  43. skip_install = true
  44. deps =
  45. twine
  46. # install_command = pip install --upgrade build
  47. commands = python setup.py bdist_wheel sdist
  48. twine upload dist/*
  49. [testenv:release-test]
  50. description = build and release the package.
  51. skip_install = true
  52. deps =
  53. twine
  54. # install_command = pip install --upgrade build
  55. commands = python setup.py bdist_wheel sdist
  56. twine upload -r testpypi dist/*
  57. [testenv:test-send]
  58. description = Send actual emails in order to visually test content embedding and actual sending
  59. deps =
  60. python-dotenv
  61. -rrequirements.txt
  62. # install_command = pip install --upgrade build
  63. commands = python ci/test_send.py