-
Notifications
You must be signed in to change notification settings - Fork 7
/
Copy pathtox.ini
80 lines (72 loc) · 1.81 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
# Tox (https://tox.readthedocs.io/) is a tool for running tests
# in multiple virtualenvs. This configuration file will run the
# test suite on all supported python versions. To use it, "pip install tox"
# and then run "tox" from this directory.
#
# See also https://tox.readthedocs.io/en/latest/config.html for more
# configuration options.
[tox]
# Choose your Python versions. They have to be available
# on the system the tests are run on.
envlist = py35, py36, py37, lint, docker
skip_missing_interpreters = true
[testenv]
commands =
python --version
python -c "import numpy as np; from tomato import __version__; print(__version__)"
pytest tests -m "not smoke" --cov=tomato --cov-report term --cov-append
description = run unittests
deps =
pytest
pytest-cov
depends =
{py35, py36, py37}: clean
report: py35, py36, py37
[testenv:report]
commands =
coverage report
coverage html
deps = coverage
skip_install = true
[testenv:clean]
commands = coverage erase
deps = coverage
skip_install = true
[testenv:flake8]
commands =
flake8 src/tomato
flake8 setup.py
deps =
flake8
skip_install = true
[testenv:pylint]
commands =
pylint-fail-under --fail_under 9.80 tomato setup.py
deps =
-rrequirements.txt
pylint
pylint-fail-under
[testenv:lint]
deps =
{[testenv:flake8]deps}
{[testenv:pylint]deps}
commands =
{[testenv:flake8]commands}
{[testenv:pylint]commands}
[testenv:docker]
setenv =
DOCKER_TAG = sertansenturk/tomato
DOCKER_VER = latest
DOCKER_FILE = Dockerfile
commands =
docker build . \
-t sertansenturk/tomato:latest
docker build . \
-f docker/tests/Dockerfile \
-t sertansenturk/tomato-test:latest
docker run \
sertansenturk/tomato-test:latest \
python3 -m pytest tests
deps =
whitelist_externals = docker
skip_install = true