forked from terrapower/armi
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathtox.ini
95 lines (86 loc) · 2.26 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
[tox]
envlist = py38,lint,cov
# need pip at least with --prefer-binary
requires =
pip >= 20.2
[testenv]
basepython = {env:PYTHON3_PATH:python3}
deps=
pip >= 20.2
-r{toxinidir}/requirements.txt
-r{toxinidir}/requirements-testing.txt
setenv =
PYTHONPATH = {toxinidir}
USERNAME = armi
[testenv:doc]
whitelist_externals =
/usr/bin/git
/usr/bin/make
deps=
-r{toxinidir}/doc/requirements-docs.txt
changedir = doc
commands =
git submodule init
git submodule update
make html
# First, run code coverage over the unit tests that run MPI library code.
[testenv:cov1]
deps=
pip>=20.2
mpi4py
-r{toxinidir}/requirements.txt
-r{toxinidir}/requirements-testing.txt
whitelist_externals =
/usr/bin/mpiexec
commands =
mpiexec -n 2 --use-hwthread-cpus coverage run --rcfile=.coveragerc -m pytest --cov=armi --cov-config=.coveragerc --ignore=venv armi/tests/test_mpiFeatures.py
# Second, run code coverage over the rest of the unit tests, and combine the coverage results together
[testenv:cov2]
deps=
pip>=20.2
mpi4py
-r{toxinidir}/requirements.txt
-r{toxinidir}/requirements-testing.txt
whitelist_externals =
/usr/bin/mpiexec
commands =
coverage run --rcfile=.coveragerc -m pytest -n 4 --cov=armi --cov-config=.coveragerc --cov-append --ignore=armi/utils/tests/test_gridGui.py --ignore=venv armi
coverage combine --rcfile=.coveragerc --keep -a
# NOTE: This only runs the MPI unit tests.
# NOTE: This will only work in POSIX/BASH Linux.
[testenv:mpitest]
deps=
pip >= 20.2
mpi4py
whitelist_externals =
/usr/bin/mpiexec
commands =
pip install -r requirements.txt
pip install -r requirements-testing.txt
mpiexec -n 2 --use-hwthread-cpus pytest armi/tests/test_mpiFeatures.py
[testenv:lint]
ignore_errors = true
commands =
- pylint armi --rcfile={toxinidir}/pylintrc
[testenv:report]
skip_install = true
deps=
coveralls
commands =
coverage report
coverage html
coveralls --service=github
depends =
cov
passenv = TOXENV CI GITHUB_*
[testenv:manifest]
basepython = {env:PYTHON3_PATH:python3}
setenv =
PYTHONPATH = {toxinidir}
USERNAME = armi
commands =
python .github/workflows/validatemanifest.py
[testenv:clean]
deps = coverage
skip_install = true
commands = coverage erase