Skip to content

Commit

Permalink
test script unification
Browse files Browse the repository at this point in the history
  • Loading branch information
Ronald Krist committed Nov 22, 2023
1 parent 9090f72 commit dba4d3d
Showing 1 changed file with 14 additions and 7 deletions.
21 changes: 14 additions & 7 deletions run_tests.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,24 +5,31 @@ OAREPO_VERSION=${OAREPO_VERSION:-11}
OAREPO_VERSION_MAX=$((OAREPO_VERSION+1))

MODEL="thesis"
MODEL_VENV=".model_venv"
CODE_TEST_DIR="tests"

BUILDER_VENV=.venv-builder
BUILD_TEST_DIR="tests"
CODE_TEST_DIR="tests"

if test ! -d $BUILD_TEST_DIR; then
mkdir $BUILD_TEST_DIR
if test -d $BUILDER_VENV ; then
rm -rf $BUILDER_VENV
fi

python3 -m venv $BUILDER_VENV
. $BUILDER_VENV/bin/activate
pip install -U setuptools pip wheel
pip install -U oarepo-model-builder-tests oarepo-model-builder-requests oarepo-model-builder-drafts

if test -d $BUILD_TEST_DIR/$MODEL; then
rm -rf $MODEL
fi

oarepo-compile-model ./$CODE_TEST_DIR/$MODEL.yaml --output-directory ./$BUILD_TEST_DIR/$MODEL -vvv

MODEL_VENV=".venv-tests"

if test -d $MODEL_VENV; then
rm -rf $MODEL_VENV
fi

oarepo-compile-model ./$CODE_TEST_DIR/$MODEL.yaml --output-directory ./$BUILD_TEST_DIR/$MODEL -vvv

python3 -m venv $MODEL_VENV
. $MODEL_VENV/bin/activate
pip install -U setuptools pip wheel
Expand Down

0 comments on commit dba4d3d

Please sign in to comment.