-
Notifications
You must be signed in to change notification settings - Fork 2
/
tox.ini
63 lines (57 loc) · 1.9 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
[tox]
envlist = py38, docs, linting, report
isolated_build = True
[pytest]
# this runs the tests in multiple processes but unfortunately prevents logs in tests from being displayed
# https://github.com/pytest-dev/pytest-xdist/issues/402
# one does not always benefit from the parallelization of all tests. Uncomment the following line if you want
# to enable multiprocess-parallelization
;addopts = -n auto --dist=loadfile
[testenv]
# pytest-cov has an issue when the tests are inside an sdist, as created by tox by default
# despite tests being run, coverage discovers no data, leading to: Coverage.py warning: No data was collected
# this issue is resolved by running pytest-cov within tox development mode, thus not creating an sdist
usedevelop = true
# pass environment variables defined in Gitlab CI or Github Actions
passenv =
GITLAB_*
GITHUB_*
CI
commands =
coverage erase
pytest --cov --cov-append --cov-report=term-missing tests
pytest -n 4 notebooks
deps =
-rrequirements-test.txt
-rrequirements.txt
allowlist_externals =
coverage
pytest
[testenv:linting]
skip_install = true
setenv =
PYLINTHOME = .pylint.d
commands =
bash build_scripts/build-linting-report.sh
deps =
-rrequirements-linting.txt
allowlist_externals =
bash
[testenv:docs]
; NOTE: we don't use pytest for running the doctest, even though with pytest no imports have to be written in them
; The reason is that we want to be running doctest during the docs build (which might happen on a remote machine,
; like read_the_docs does) with possibly fewer external dependencies and use sphinx' ability to automock the missing ones.
commands =
bash build_scripts/build-docs.sh
deps =
-rrequirements-docs.txt
allowlist_externals =
bash
[testenv:report]
skip_install = true
commands =
bash build_scripts/build-coverage-report.sh
deps =
-rrequirements-coverage.txt
allowlist_externals =
bash