diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 5730a190..a068d6b0 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -23,7 +23,7 @@ stages: cache: key: files: - - yarn.lock + - gui/yarn.lock paths: - gui/node_modules/ policy: pull-push @@ -53,10 +53,18 @@ stages: extends: - .build-base image: docker.io/python:3.10 + cache: + key: + files: + - api/requirements.txt + paths: + - api/onnx_env/ + policy: pull-push .build-curl: extends: - .build-python + cache: {} build-api-coverage: extends: @@ -64,6 +72,7 @@ build-api-coverage: stage: build script: - cd api + - ${CI_PROJECT_DIR}/common/scripts/make-venv.sh - make ci build-gui-bundle: diff --git a/common/scripts/make-venv.sh b/common/scripts/make-venv.sh new file mode 100755 index 00000000..3c42cb8d --- /dev/null +++ b/common/scripts/make-venv.sh @@ -0,0 +1,10 @@ +#! /bin/sh + +if [ -d onnx_env ]; +then + echo "Activating existing venv..." + source onnx_env/bin/activate +else + echo "Creating new venv..." + python3 -m venv onnx_env +fi