diff --git a/Makefile b/Makefile index fa47da669..45d3a53e8 100644 --- a/Makefile +++ b/Makefile @@ -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 diff --git a/runtimes/alibi-detect/tox.ini b/runtimes/alibi-detect/tox.ini index 026940b6f..bc9e828df 100644 --- a/runtimes/alibi-detect/tox.ini +++ b/runtimes/alibi-detect/tox.ini @@ -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 \ diff --git a/runtimes/alibi-explain/tox.ini b/runtimes/alibi-explain/tox.ini index 026940b6f..bc9e828df 100644 --- a/runtimes/alibi-explain/tox.ini +++ b/runtimes/alibi-explain/tox.ini @@ -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 \ diff --git a/runtimes/catboost/tox.ini b/runtimes/catboost/tox.ini index 21f3266d4..bc9e828df 100644 --- a/runtimes/catboost/tox.ini +++ b/runtimes/catboost/tox.ini @@ -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 diff --git a/runtimes/huggingface/tox.ini b/runtimes/huggingface/tox.ini index 026940b6f..bc9e828df 100644 --- a/runtimes/huggingface/tox.ini +++ b/runtimes/huggingface/tox.ini @@ -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 \ diff --git a/runtimes/lightgbm/tox.ini b/runtimes/lightgbm/tox.ini index 026940b6f..bc9e828df 100644 --- a/runtimes/lightgbm/tox.ini +++ b/runtimes/lightgbm/tox.ini @@ -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 \ diff --git a/runtimes/mlflow/tox.ini b/runtimes/mlflow/tox.ini index 026940b6f..bc9e828df 100644 --- a/runtimes/mlflow/tox.ini +++ b/runtimes/mlflow/tox.ini @@ -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 \ diff --git a/runtimes/mllib/tox.ini b/runtimes/mllib/tox.ini index 026940b6f..bc9e828df 100644 --- a/runtimes/mllib/tox.ini +++ b/runtimes/mllib/tox.ini @@ -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 \ diff --git a/runtimes/sklearn/tox.ini b/runtimes/sklearn/tox.ini index 026940b6f..bc9e828df 100644 --- a/runtimes/sklearn/tox.ini +++ b/runtimes/sklearn/tox.ini @@ -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 \ diff --git a/runtimes/xgboost/tox.ini b/runtimes/xgboost/tox.ini index 026940b6f..bc9e828df 100644 --- a/runtimes/xgboost/tox.ini +++ b/runtimes/xgboost/tox.ini @@ -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 \ diff --git a/tox.runtime.ini b/tox.runtime.ini new file mode 100644 index 000000000..bc9e828df --- /dev/null +++ b/tox.runtime.ini @@ -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