Skip to content

Commit

Permalink
test: Add bootstrapping runtimes with same Tox env
Browse files Browse the repository at this point in the history
  • Loading branch information
jesse-c committed Jun 6, 2024
1 parent cb51790 commit 73fc9e9
Show file tree
Hide file tree
Showing 11 changed files with 29 additions and 10 deletions.
8 changes: 8 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,14 @@ IMAGE_NAME := seldonio/mlserver
.PHONY: install-dev _generate generate run build \
push-test push test lint fmt version clean licenses

.PHONY: bootstrap-test
bootstrap-test:
for _runtime in ./runtimes/*; \
do \
echo "Copying Tox configuration to $$_runtime..."; \
cp tox.runtime.ini $$_runtime/tox.ini; \
done

install-dev:
poetry install --sync --with all-runtimes --with all-runtimes-dev

Expand Down
2 changes: 1 addition & 1 deletion runtimes/alibi-detect/tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ isolated_build = true
[testenv]
allowlist_externals = poetry
commands_pre =
poetry install --sync --no-root
poetry install --sync --no-root
poetry install -C {toxinidir}/../../
commands =
python -m pytest {posargs} -n auto \
Expand Down
2 changes: 1 addition & 1 deletion runtimes/alibi-explain/tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ isolated_build = true
[testenv]
allowlist_externals = poetry
commands_pre =
poetry install --sync --no-root
poetry install --sync --no-root
poetry install -C {toxinidir}/../../
commands =
python -m pytest {posargs} -n auto \
Expand Down
4 changes: 2 additions & 2 deletions runtimes/catboost/tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ isolated_build = true
[testenv]
allowlist_externals = poetry
commands_pre =
poetry install --sync --no-root
poetry install --sync --no-root
poetry install -C {toxinidir}/../../
commands =
python -m pytest {posargs} \
python -m pytest {posargs} -n auto \
{toxinidir}/tests
2 changes: 1 addition & 1 deletion runtimes/huggingface/tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ isolated_build = true
[testenv]
allowlist_externals = poetry
commands_pre =
poetry install --sync --no-root
poetry install --sync --no-root
poetry install -C {toxinidir}/../../
commands =
python -m pytest {posargs} -n auto \
Expand Down
2 changes: 1 addition & 1 deletion runtimes/lightgbm/tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ isolated_build = true
[testenv]
allowlist_externals = poetry
commands_pre =
poetry install --sync --no-root
poetry install --sync --no-root
poetry install -C {toxinidir}/../../
commands =
python -m pytest {posargs} -n auto \
Expand Down
2 changes: 1 addition & 1 deletion runtimes/mlflow/tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ isolated_build = true
[testenv]
allowlist_externals = poetry
commands_pre =
poetry install --sync --no-root
poetry install --sync --no-root
poetry install -C {toxinidir}/../../
commands =
python -m pytest {posargs} -n auto \
Expand Down
2 changes: 1 addition & 1 deletion runtimes/mllib/tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ isolated_build = true
[testenv]
allowlist_externals = poetry
commands_pre =
poetry install --sync --no-root
poetry install --sync --no-root
poetry install -C {toxinidir}/../../
commands =
python -m pytest {posargs} -n auto \
Expand Down
2 changes: 1 addition & 1 deletion runtimes/sklearn/tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ isolated_build = true
[testenv]
allowlist_externals = poetry
commands_pre =
poetry install --sync --no-root
poetry install --sync --no-root
poetry install -C {toxinidir}/../../
commands =
python -m pytest {posargs} -n auto \
Expand Down
2 changes: 1 addition & 1 deletion runtimes/xgboost/tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ isolated_build = true
[testenv]
allowlist_externals = poetry
commands_pre =
poetry install --sync --no-root
poetry install --sync --no-root
poetry install -C {toxinidir}/../../
commands =
python -m pytest {posargs} -n auto \
Expand Down
11 changes: 11 additions & 0 deletions tox.runtime.ini
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
[tox]
isolated_build = true

[testenv]
allowlist_externals = poetry
commands_pre =
poetry install --sync --no-root
poetry install -C {toxinidir}/../../
commands =
python -m pytest {posargs} -n auto \
{toxinidir}/tests

0 comments on commit 73fc9e9

Please sign in to comment.