pytest-csv-params/.ci/Jenkinsfile

53 lines
1.7 KiB
Groovy

pipeline {
environment {
TOX_PARALLEL_NO_SPINNER = "1"
PY_COLORS = "0"
}
agent any
stages {
stage('Prepare') {
steps {
sh 'poetry install'
}
}
stage('Tox') {
matrix {
axes {
axis {
name 'PYTHON_VERSION'
values 'py38', 'py39', 'py310'
}
}
stages {
stage('Tox Test') {
options {
lock('single-tox-build')
}
steps {
sh 'poetry run tox -r -e ${PYTHON_VERSION}'
xunit checksName: '', tools: [JUnit(excludesPattern: '', pattern: 'test-reports/*.xml', stopProcessingIfError: true)]
cobertura autoUpdateStability: false, coberturaReportFile: 'coverage.xml', conditionalCoverageTargets: '70, 0, 0', failUnhealthy: false, failUnstable: false, lineCoverageTargets: '80, 0, 0', maxNumberOfBuilds: 0, methodCoverageTargets: '80, 0, 0', onlyStable: false
}
}
}
}
}
}
post {
success {
cleanWs()
}
always {
withCredentials([string(credentialsId: 'jed-notification-email', variable: 'EMAIL')]) {
mail to: "${EMAIL}",
subject: "[pytest-csv-params] ${currentBuild.currentResult}: ${currentBuild.fullDisplayName}",
body: "Jenkins URL: ${env.BUILD_URL}"
}
}
}
}