-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathtox.ini
41 lines (36 loc) · 1.38 KB
/
tox.ini
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
[tox]
# explicitly set python versions to make it possible to run tests in parallel
# using pyenv
# pypy is an exception case because there is no pypy3.# alias with a patch
# number, at least on macos
# we omit the ambiguous "py3" factor so as to not run the tests for a superfluous
# version that is being run elsewhere
envlist =
py3-{lint,test,docs}
update
skip_missing_interpreters=True
[testenv]
setenv =
PROJECT_PATH=friendlypins
usedevelop=True
# Separate working folders for each python version
envdir =
py3: {toxworkdir}/py3
update: {toxworkdir}/update
pypy3: {toxworkdir}/pypy3
# Use consistent set of dependencies for each major Python version
# helps minimize overhead of dependency management
deps =
py3,update: -rrequirements.txt
pypy3: -rpypyrequirements.txt
# restrict running of non-test operations to just the latest supported Python
# version - v3.8 in this case
commands =
lint: python -m pylint setup.py
lint: python -m pylint update.py
lint: python -m pylint -d invalid-name docs/conf.py
lint: python -m pylint ./src/{env:PROJECT_PATH}
test: python -m pytest {posargs} ./tests -v --cov-report html --cov {env:PROJECT_PATH} --no-cov-on-fail
update: python update.py {posargs}
docs: python -c "import shutil; shutil.rmtree('htmldocs', ignore_errors=True)"
docs: python -m sphinx -b html -anW --keep-going ./docs ./htmldocs