diff --git a/.gitignore b/.gitignore index fa5423e..0018c16 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,4 @@ .coverage docs/_build/ +.tox/ WuttJamaican.egg-info/ diff --git a/setup.cfg b/setup.cfg index 7b0fba0..79659c4 100644 --- a/setup.cfg +++ b/setup.cfg @@ -40,5 +40,6 @@ where = src [options.extras_require] +db = SQLAlchemy<2 docs = Sphinx -tests = pytest-cov; SQLAlchemy<2 +tests = pytest-cov; tox diff --git a/tox.ini b/tox.ini new file mode 100644 index 0000000..fe643fd --- /dev/null +++ b/tox.ini @@ -0,0 +1,27 @@ + +[tox] +envlist = py36, py37, py38, py39, py310, py311 + +[testenv] +commands = + pip install -U pip + pip install -U setuptools wheel + pip install -U --upgrade-strategy eager wuttjamaican[docs,tests] + pytest {posargs} + +[testenv:coverage] +basepython = python3.11 +commands = + pip install -U pip + pip install -U setuptools wheel + pip install -U --upgrade-strategy eager wuttjamaican[db,tests] + pytest --cov=wuttjamaican --cov-report=html --cov-fail-under=100 + +[testenv:docs] +basepython = python3.11 +changedir = docs +commands = + pip install -U pip + pip install -U setuptools wheel + pip install -U --upgrade-strategy eager wuttjamaican[db,docs] + sphinx-build -b html -d {envtmpdir}/doctrees -W -T . {envtmpdir}/docs