From b92fa8f03c59bc86888a364ad7f0046f5ac7136c Mon Sep 17 00:00:00 2001 From: Mpho raf Date: Tue, 1 Mar 2022 15:13:30 +0200 Subject: [PATCH] adding virtual enviros --- Jenkinsfile | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/Jenkinsfile b/Jenkinsfile index 3117449..38c242f 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -29,9 +29,12 @@ pipeline { args '-e DJANGO_SETTINGS_MODULE="locallibrary.settings"'} } steps { - sh 'pip install -r requirements.txt' - sh 'python -m pytest catalog/tests/' - sh 'python -m xmlrunner discover -p *_test.py' + sh ''' + cd /tmp/; virtualenv pitestenv; source ./pitestenv/bin/activate + pip install -r requirements.txt; cd - + python -m pytest catalog/tests/ + python -m xmlrunner discover -p *_test.py + ''' } } }