forked from SeldonIO/MLServer
-
Notifications
You must be signed in to change notification settings - Fork 0
/
tox.ini
86 lines (81 loc) · 2.71 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
[tox]
basepython = py3
isolated_build = true
envlist =
mlserver
all-runtimes
py3
[testenv]
allowlist_externals = poetry
[testenv:py3]
commands_pre =
poetry install --sync --no-root
commands =
python -m pytest {posargs} -n auto
[testenv:mlserver]
commands_pre =
poetry install --sync --no-root
commands =
python -m pytest {posargs} -n auto \
{toxinidir}/tests \
--ignore={toxinidir}/tests/kafka \
--ignore={toxinidir}/tests/parallel \
--ignore={toxinidir}/tests/grpc
# kafka and parallel tests are failing for macos when running in parallel
# with the entire test suite. grpc tests are are also flaky when running
# in parallel. So, we run them separately.
python -m pytest {posargs} \
{toxinidir}/tests/kafka \
{toxinidir}/tests/parallel \
{toxinidir}/tests/grpc
# We run the grpc interceptor test separately because other tests will
# interfere with the metrics counter when running in parallel.
python -m pytest {posargs} \
{toxinidir}/tests/grpc/test_interceptor.py
set_env =
GITHUB_SERVER_URL = {env:GITHUB_SERVER_URL:https\://github.com}
GITHUB_REPOSITORY = {env:GITHUB_REPOSITORY:SeldonIO/MLServer}
GITHUB_REF = {env:GITHUB_REF:refs/heads/master}
[testenv:all-runtimes]
commands_pre =
poetry install --sync --no-root \
--with all-runtimes \
--with all-runtimes-dev
commands =
python -m pytest {posargs} -n auto \
{toxinidir}/tests \
{toxinidir}/runtimes/alibi-explain \
{toxinidir}/runtimes/alibi-detect \
{toxinidir}/runtimes/sklearn \
{toxinidir}/runtimes/xgboost \
{toxinidir}/runtimes/mllib \
{toxinidir}/runtimes/lightgbm \
{toxinidir}/runtimes/mlflow \
{toxinidir}/runtimes/huggingface \
--ignore={toxinidir}/tests/kafka \
--ignore={toxinidir}/tests/parallel
# kafka and parallel tests are failinig for macos when running in parallel
# with the entire test suite. So, we run them separately.
python -m pytest {posargs} \
{toxinidir}/tests/kafka \
{toxinidir}/tests/parallel
set_env =
GITHUB_SERVER_URL = {env:GITHUB_SERVER_URL:https\://github.com}
GITHUB_REPOSITORY = {env:GITHUB_REPOSITORY:SeldonIO/MLServer}
GITHUB_REF = {env:GITHUB_REF:refs/heads/master}
[testenv:licenses]
commands_pre =
poetry install --sync --no-root \
--with all-runtimes \
--with all-runtimes-dev
commands =
pip-licenses \
--from=mixed \
--format=csv \
--output-file=./licenses/license_info.csv
pip-licenses \
--from=mixed \
--format=plain-vertical \
--with-license-file \
--no-license-path \
--output-file=./licenses/license.txt