-
Notifications
You must be signed in to change notification settings - Fork 0
/
tox.ini
60 lines (51 loc) · 1.72 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
[tox]
isolated_build = True
envlist = pylint,bandit,py38,coverage
skipsdist = false
skip_missing_interpreters = true
[testenv]
deps = pytest
coverage
pytest-cov
-rrequirements.txt
-rrequirements-dev.txt
commands = pytest --cov-config tox.ini \
--cov workbook_reader \
--cov-report term-missing \
--cov-report xml:{envlogdir}/coverage.xml \
--cov-report html:{envlogdir}/coverage.html \
--junitxml={envlogdir}/junit-{envname}.xml \
-p no:cacheprovider \
{posargs}
[pytest]
addopts = --strict-markers
junit_family = xunit2
[testenv:mypy]
deps = mypy
commands = - mypy -m workbook_reader
[testenv:pylint]
deps = pylint
-rrequirements.txt
commands = - pylint workbook_reader --rcfile=.pylintrc -r n
# Tox dropped file redirection a while ago, but we can fake it by
# executing bash where appropriate
[testenv:pylint-sonar]
platform = linux|linux2
whitelist_externals = bash
deps = pylint
-rrequirements.txt
commands = - bash -c 'pylint workbook_reader --rcfile=.pylintrc -r n | tee -a {envlogdir}/pylint_report.txt'
[testenv:bandit]
deps = bandit
# XML format is JUnit/xUnit. Multiple output formats will require multiple invocations.
commands = bandit -f xml -o {envlogdir}/bandit.xml -r workbook_reader
# TODO: Figure out how to use PyPA build utility within tox
# https://setuptools.readthedocs.io/en/latest/build_meta.html
# TL;DR pip install -q build; python -m build
[testenv:coverage]
deps = coverage
commands = coverage report --rcfile=tox.ini
coverage html -d {envlogdir}/coverage_html --rcfile=tox.ini
# Settings for coverage utility
[report]
show_missing = True