From 26b78adb563ac88977d9e6295a875dad34ada91f Mon Sep 17 00:00:00 2001 From: Lance Edgar Date: Sun, 29 Oct 2023 10:26:02 -0500 Subject: [PATCH] Add tox config --- .gitignore | 1 + setup.cfg | 3 ++- tox.ini | 27 +++++++++++++++++++++++++++ 3 files changed, 30 insertions(+), 1 deletion(-) create mode 100644 tox.ini 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