-
Notifications
You must be signed in to change notification settings - Fork 1
/
tox.ini
97 lines (87 loc) · 2.67 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
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
# content of: tox.ini , put in same dir as setup.py
[tox]
#envlist = test, docs
envlist = {py37, py38, py39}-{test}
skip_missing_interpreters = true
[testenv]
extras = all
passenv = DISPLAY
description =
test: Runs all tests except those marked slow (can pass --runslow)
deps =
test: pytest
commands =
test: pytest {posargs}
[testenv:{py37, py38, py39}-{unit_test, validation_test}]
extras = all
passenv = DISPLAY
description =
unit_test: Unit testing, runs all except those marked slow (can pass --runslow), can pass limited args to pytest
validation_test: Validation testing, runs all except those marked slow (can pass --runslow), can pass limited args to pytest
deps =
unit_test,validation_test: pytest
commands =
unit_test: pytest test/unit {posargs}
validation_test: pytest test/validation {posargs}
[coverage:run]
source = gncpy
[coverage:paths]
source =
src/
.tox/**/lib/python*/site-packages/
[testenv:coverage_report]
description = Run all the tests and generate a coverage summary report
extras = all
passenv = DISPLAY
deps =
pytest
pytest-cov
commands =
coverage run -m pytest --runslow --runxfail --no-cov-on-fail
coverage report
coverage html -d docs/build/html/reports/coverage --title="GNCPy's Test Coverage"
coverage xml -o docs/build/html/reports/coverage/coverage.xml
[testenv:test_report]
description = Run all the tests and generate a html summary report
extras = all
passenv = DISPLAY
deps =
pytest
pytest-html
commands =
pytest --runslow --runxfail --junit-xml=docs/build/html/reports/junit/junit.xml --html=docs/build/html/reports/junit/junit.html
[testenv:docs_html]
description = Build the html documentation with sphinx, can pass -- -Dversion=VERSION (ex: tox -e docs_pdf -- -Dversion=1.0.0)
extras = all
passenv = DISPLAY
deps =
sphinx >= 1.7.5
sphinx_rtd_theme
sphinxcontrib-bibtex
sphinxcontrib-svg2pdfconverter
sphinx-copybutton
sphinx_sitemap
commands =
sphinx-build -b html {posargs} docs/source/ docs/build/html/
; [testenv:docs_pdf]
; description = Build the PDF documentation with sphinx, can pass -- -Dversion=VERSION (ex: tox -e docs_pdf -- -Dversion=1.0.0)
; extras = all
; passenv = DISPLAY
; deps =
; sphinx >= 1.7.5
; sphinx_rtd_theme
; sphinxcontrib-bibtex
; sphinxcontrib-svg2pdfconverter
; sphinx-copybutton
; sphinx_sitemap
; allowlist_externals =
; make
; commands =
; sphinx-build -b latex {posargs} docs/source/ docs/build/pdf/
; make -C docs/build/pdf
[testenv:clean_docs]
description = Cleans the documentation build folder (from sphinx)
deps =
sphinx >= 1.7.5
commands =
sphinx-build -M clean docs/source/ docs/build/