-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathtox.ini
42 lines (35 loc) · 1.2 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
[tox]
envlist = py37
# envlist = py36,flake8
[testenv]
# disabled 5/7/19, don't slow down
# recreate = true
setenv =
PYTHONHASHSEED = 2685
PACKAGE_DIR = contentai_metadata_flatten
# add CI flag that can be passed along
RUN_IN_CI = {env:GITLAB_CI:}
TOX_ARG = {env:TOX_ARG:}
# https://github.com/tox-dev/tox/issues/1259 - need for env hack
envdirhack = {envdir}/lib/python3.7/site-packages
passenv = *
whitelist_externals = echo
deps = -r{toxinidir}/testing/tox-requirements.txt
coverage
collect_ignore = ["setup.py"]
commands = coverage erase
echo {envdir} {envbindir} {envsitepackagesdir} {envtmpdir} {envlogdir} {env:envdirhack}
py.test --cov={env:envdirhack}/{env:PACKAGE_DIR} --ignore=setup.py {env:TOX_ARG}
# py.test --cov={envsitepackagesdir}/my_app --cov-fail-under=50
# py.test --cov={envsitepackagesdir}/{env:PACKAGE_DIR} --cov-fail-under=50 --ignore=setup.py
# coverage run --source={env:PACKAGE_DIR} -p -m py.test # duplicate action for gitlab reporting
# coverage combine
# coverage report
coverage html
[testenv:flake8]
# basepython = python3.7
skip_install = true
deps = flake8
commands = flake8 --exclude .tox
[flake8]
ignore = E501