-
Notifications
You must be signed in to change notification settings - Fork 0
/
tox.ini
68 lines (58 loc) · 2.83 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
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
[vars]
project_name = lose
[tox]
envlist = clean, py36, coverage-report
skipsdist = True
skip_missing_interpreters = True
sitepackages = False
[testenv]
passenv = *
whitelist_externals = *
install_command = {envpython} -m pip install -U --process-dependency-links {opts} {packages}
envdir = {env:WORKON_HOME}/tox-{[vars]project_name}/{envname}
sitepackages = False
recreate = True
deps =
--editable=file:https:///{toxinidir}[tests]
--editable=file:https:///{toxinidir}
py{27,35,36,37,py}-requirements: -r{toxinidir}/requirements.txt
commands =
mkdir -p {toxinidir}/docs/reports
py{27,35,36,37,py}: {envpython} -m pytest --html={toxinidir}/docs/reports/{envname}-report.html {toxinidir} {posargs}
smoke: {envpython} -m pytest -m smoke --html={toxinidir}/docs/reports/{envname}-report.html {toxinidir} {posargs}
unit: {envpython} -m pytest -m unit --html={toxinidir}/docs/reports/{envname}-report.html {toxinidir} {posargs}
integration: {envpython} -m pytest -m integration --html={toxinidir}/docs/reports/{envname}-report.html {toxinidir} {posargs}
requirements: {envpython} -m pytest --html={toxinidir}/docs/reports/{envname}-report.html {toxinidir} {posargs}
license: {envpython} -m pytest -m license --license --cov-fail-under=0 --html={toxinidir}/docs/reports/{envname}-report.html {toxinidir} {posargs}
py{27,35,36,37,py}-smoke: {envpython} -m pytest -m smoke --html={toxinidir}/docs/reports/{envname}-report.html {toxinidir} {posargs}
py{27,35,36,37,py}-unit: {envpython} -m pytest -m unit --html={toxinidir}/docs/reports/{envname}-report.html {toxinidir} {posargs}
py{27,35,36,37,py}-integration: {envpython} -m pytest -m integration --html={toxinidir}/docs/reports/{envname}-report.html {toxinidir} {posargs}
py{27,35,36,37,py}-requirements: {envpython} -m pytest --html={toxinidir}/docs/reports/{envname}-report.html {toxinidir} {posargs}
py{27,35,36,37,py}-license: {envpython} -m pytest -m license --license --html={toxinidir}/docs/reports/{envname}-report.html {toxinidir} {posargs}
[testenv:clean]
deps = coverage
recreate = False
skip_install = true
commands =
find {toxinidir} -name '*.pyc' -delete
find {toxinidir} -name '__pycache__' -delete
find {toxinidir} -name 'build' -delete
find {toxinidir} -name 'dist' -delete
coverage erase
rm -Rf {toxinidir}/*.egg-info {toxinidir}/.cache {toxinidir}/.eggs {toxinidir}/.tox {toxinidir}/htmlcov
rm -Rf {toxinidir}/build {toxinidir}/dist
rm -Rf {toxinidir}/docs/_build {toxinidir}/docs/coverage {toxinidir}/docs/reports
[testenv:coverage-report]
deps = coverage
recreate = False
skip_install = true
commands =
coverage report -m
[testenv:docs]
sitepackages = False
recreate = True
deps = --editable=file:https:///{toxinidir}[docs]
commands =
coverage html --directory={toxinidir}/docs/coverage
coverage html
{envpython} setup.py build_sphinx