From 79f961dfa3f22096228498f2d11371bebbebe50f Mon Sep 17 00:00:00 2001 From: Jan David Mol <mol@astron.nl> Date: Fri, 15 Dec 2023 08:55:54 +0100 Subject: [PATCH] Create a virtual environment before using pip install --- .gitlab-ci.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 35578a611..594bc6a6f 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -65,6 +65,7 @@ wheel_packaging: echo "Running on branch '$CI_COMMIT_BRANCH': tag = $tag" fi - apk add --update make bash docker-compose python3 py3-pip + - python3 -m venv venv && source venv/bin/activate - pip install shyaml - docker login -u $CI_REGISTRY_USER -p $CI_REGISTRY_PASSWORD $CI_REGISTRY - touch ~/.Xauthority @@ -286,6 +287,7 @@ unit_test: - apk add --update bind-tools - apk add --update postgresql14-client gzip socat - apk add --update python3 py3-pip + - python3 -m venv venv && source venv/bin/activate - pip install shyaml - docker login -u $CI_REGISTRY_USER -p $CI_REGISTRY_PASSWORD $CI_REGISTRY - touch /root/.Xauthority @@ -351,6 +353,7 @@ publish_on_gitlab: before_script: - python3 --version - pip --version + - python3 -m venv venv && source venv/bin/activate - pip install twine --upgrade script: - echo "run twine for gitlab" -- GitLab