Files
python-test/Jenkinsfile
T
admin-tea fbba40fb3e
ci-tests/python-test/pipeline/head There was a failure building this commit
Using git scm
2021-02-02 16:21:25 +02:00

45 lines
1.4 KiB
Groovy

pipeline {
agent any
options {
parallelsAlwaysFailFast()
}
script {
checkout scm
}
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 'pip3 install -r requirements.txt'
sh 'python -m pytest catalog/tests/'
sh 'python -m xmlrunner discover -p *_test.py'
}
}
}
}
}
}
}