fix(build): use and cache venv for API job
This commit is contained in:
parent
a8bc371478
commit
46e0fe2cf7
|
@ -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:
|
||||
|
|
|
@ -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
|
Loading…
Reference in New Issue