summaryrefslogtreecommitdiff
path: root/tox.ini
diff options
context:
space:
mode:
authorJon Parise <jon@pinterest.com>2022-02-15 15:22:43 -0800
committerGitHub <noreply@github.com>2022-02-15 15:22:43 -0800
commit900fc18db76a4e20c77f748bcffff2055231a3b5 (patch)
tree702438eaabe101cfc198b9b1b6cca6d4e335a638 /tox.ini
parent4611e0b01589cb7b4c18455fd0805204d320e11e (diff)
downloadpymemcache-900fc18db76a4e20c77f748bcffff2055231a3b5.tar.gz
Revise tox configuration (#375)
This repositions tox as the "source of truth" for all development and CI actions. To support this, lint and test requirements have been split into separate sets of requirements, and a consolidated 'lint' environment now runs all of our lint checks. This is also used by CI.
Diffstat (limited to 'tox.ini')
-rw-r--r--tox.ini47
1 files changed, 19 insertions, 28 deletions
diff --git a/tox.ini b/tox.ini
index 8cdb1d2..388c35a 100644
--- a/tox.ini
+++ b/tox.ini
@@ -1,47 +1,38 @@
[tox]
-envlist = py37, py38, py39, py310, pypy3, flake8, black, integration
-skip_missing_interpreters = True
-# Automatic envs (pyXX) will only use the python version appropriate to that
-# env and ignore basepython inherited from [testenv] if we set
-# ignore_basepython_conflict.
-ignore_basepython_conflict = True
+envlist =
+ py37,
+ py38,
+ py39,
+ py310,
+ pypy3,
+ docs,
+ lint,
+ venv,
+skip_missing_interpreters = true
[gh-actions]
python =
pypy-3.7: pypy3
[testenv]
-basepython = python3
-setenv =
- PYTHONPATH = {toxinidir}
+description = run tests with {basepython}
deps = -r{toxinidir}/test-requirements.txt
+skip_install = True
commands =
- pip install -e .
- py.test {posargs:pymemcache/test/}
+ python -m pytest {posargs}
-[testenv:integration]
-commands =
- pip install -e .
- py.test {posargs:pymemcache/test/ -m integration}
-
-[testenv:flake8]
-# Avoid pulling all the base requirements only to run flake8
-deps = flake8
+[testenv:lint]
+description = lint source code
+deps = -r{toxinidir}/lint-requirements.txt
commands =
+ python setup.py check --metadata --restructuredtext --strict
flake8
- python setup.py check --restructuredtext
-
-[testenv:black]
-commands =
black --check .
-[testenv:coverage]
-commands =
- py.test --cov=pymemcache
-
[testenv:docs]
+description = invoke sphinx-build to build the HTML docs
+deps = -r{toxinidir}/docs-requirements.txt
commands =
- pip install -r docs-requirements.txt
sphinx-build -b html docs/ docs/_build/html
[testenv:venv]