summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHui Lan <lanhui@zjnu.edu.cn>2021-02-06 22:12:26 +0800
committerHui Lan <lanhui@zjnu.edu.cn>2021-02-06 22:12:26 +0800
commitf1d0ce465600fb3c5266343ea129e2b2b067ac89 (patch)
treea1fde09cca1767d5b5cbaff9404b0c76d0b11da7
parenta64dd587e29ee690b5912f8b69f43c277fa6387e (diff)
Jenkinsfile: install python modules only when they are not there.
-rw-r--r--Jenkinsfile4
1 files changed, 2 insertions, 2 deletions
diff --git a/Jenkinsfile b/Jenkinsfile
index b19b3c5..3dc9b74 100644
--- a/Jenkinsfile
+++ b/Jenkinsfile
@@ -20,8 +20,8 @@ pipeline {
steps {
echo 'Testing..'
sh 'sudo docker run -d -p 4444:4444 selenium/standalone-chrome'
- sh 'pip3 install pytest -U -q'
- sh 'pip3 install selenium -U -q'
+ sh 'python3 -c "import pytest" && pip3 install pytest -U -q'
+ sh 'python3 -c "import pytest" && pip3 install selenium -U -q'
sh 'python3 -m pytest ./app/test/test_signup.py'
sh 'python3 -m pytest ./app/test/test_login.py'
sh 'python3 -m pytest ./app/test/test_next_essay.py'