pytest-csv-params/.ci/Jenkinsfile
Jürgen Edelbluth 3c0892d8ee
Poetry Preparation shortened for CI
Only dependencies are installed during setup, untracked packages are removed.

Signed-off-by: Jürgen Edelbluth <jed@noreply.git.codebau.dev>
2022-08-26 17:31:50 +02:00

53 lines
1.8 KiB
Groovy

pipeline {
environment {
TOX_PARALLEL_NO_SPINNER = "1"
PY_COLORS = "0"
}
agent any
stages {
stage('Prepare') {
steps {
sh 'poetry install --remove-untracked --no-root'
}
}
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: "Tests ${PYTHON_VERSION}", 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 {
deleteDir()
}
always {
withCredentials([string(credentialsId: 'jed-notification-email', variable: 'EMAIL')]) {
mail to: "${EMAIL}",
subject: "[${currentBuild.fullDisplayName}] Build #${currentBuild.number}: ${currentBuild.currentResult}",
body: "Duration: ${currentBuild.durationString} / Jenkins URL: ${env.BUILD_URL}"
}
}
}
}