Files
python-test/Jenkinsfile
T
admin-tea 0764fa0fd1
ci-tests/python-test/pipeline/head There was a failure building this commit
pulling proper venv
2022-03-01 15:24:23 +02:00

45 lines
1.5 KiB
Groovy

pipeline {
agent any
options {
parallelsAlwaysFailFast()
}
stages {
stage('BuildAndTest') {
matrix {
agent none
axes {
axis {
name 'PY_VERSION'
values '3.6-alpine', '3.7-alpine', '3.8-alpine', '3.9-alpine'
}
}
stages {
stage('build') {
agent {
docker { image "python:$PY_VERSION"
args '-e DJANGO_SETTINGS_MODULE="locallibrary.settings"'}
}
steps {
sh 'python --version'
}
}
stage('test') {
agent {
docker { image "python:$PY_VERSION"
args '-e DJANGO_SETTINGS_MODULE="locallibrary.settings"'}
}
steps {
sh '''
python3 -m venv /tmp/pitestenv; source /tmp/pitestenv/bin/activate
pip install -r requirements.txt
python -m pytest catalog/tests/
python -m xmlrunner discover -p *_test.py
'''
}
}
}
}
}
}
}