ci: use virtualenv to avoid race conditions

Desktop QA tests also use Pytest packages and their versions are
different, so we can't install them globally, it needs to be done per
build using `WORKSPACE_TMP` as destination.

Signed-off-by: Jakub Sokołowski <jakub@status.im>
This commit is contained in:
Jakub Sokołowski 2024-04-15 15:02:00 +03:00 committed by Anastasiya
parent 119b5197b2
commit 873a804155
1 changed files with 6 additions and 1 deletions

View File

@ -70,6 +70,10 @@ pipeline {
PYTHONPATH = "${SQUISH_DIR}/lib:${SQUISH_DIR}/lib/python:${PYTHONPATH}" PYTHONPATH = "${SQUISH_DIR}/lib:${SQUISH_DIR}/lib/python:${PYTHONPATH}"
LD_LIBRARY_PATH = "${SQUISH_DIR}/lib:${SQUISH_DIR}/python3/lib:${LD_LIBRARY_PATH}" LD_LIBRARY_PATH = "${SQUISH_DIR}/lib:${SQUISH_DIR}/python3/lib:${LD_LIBRARY_PATH}"
/* Avoid race conditions with other builds using virtualenv. */
VIRTUAL_ENV = "${WORKSPACE_TMP}/venv"
PATH = "${VIRTUAL_ENV}/bin:${PATH}"
TESTRAIL_URL = 'https://ethstatus.testrail.net' TESTRAIL_URL = 'https://ethstatus.testrail.net'
TESTRAIL_PROJECT_ID = 17 TESTRAIL_PROJECT_ID = 17
@ -87,7 +91,8 @@ pipeline {
stage('Deps') { stage('Deps') {
steps { script { steps { script {
sh 'pip3 install --user -r requirements.txt' sh "python3 -m venv ${VIRTUAL_ENV}"
sh 'pip3 install -r requirements.txt'
} } } }
} }