summaryrefslogtreecommitdiff
path: root/tox.ini
blob: 8cdb1d2a5909a7f80a6a4470f8c49901d28ac75b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
[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

[gh-actions]
python =
    pypy-3.7: pypy3

[testenv]
basepython = python3
setenv =
    PYTHONPATH = {toxinidir}
deps = -r{toxinidir}/test-requirements.txt
commands =
    pip install -e .
    py.test {posargs:pymemcache/test/}

[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
commands =
    flake8
    python setup.py check --restructuredtext

[testenv:black]
commands =
    black --check .

[testenv:coverage]
commands =
    py.test --cov=pymemcache

[testenv:docs]
commands =
    pip install -r docs-requirements.txt
    sphinx-build -b html docs/ docs/_build/html

[testenv:venv]
commands = {posargs}