modvcfsamples/Jenkinsfile

47 lines
2.0 KiB
Plaintext
Raw Permalink Normal View History

2023-06-22 16:35:31 +00:00
pipeline {
agent any
stages {
stage("install") {
steps {
sh 'mamba env update --file environment.yml --prefix ./env || mamba env create --force --file environment.yml --prefix ./env'
sh 'echo conda environment: $CONDA_PREFIX'
}
}
stage("unit tests") {
steps {
sh returnStatus: true, script: "python -m pytest --junitxml=test_results.xml --cov-report xml:test_coverage.xml --cov=modvcfsamples"
2023-06-22 16:35:31 +00:00
xunit checksName: '', tools: [JUnit(excludesPattern: '', pattern: 'test_results.xml', stopProcessingIfError: true)]
cobertura autoUpdateHealth: false, autoUpdateStability: false, coberturaReportFile: 'test_coverage.xml', failUnhealthy: false, failUnstable: false, maxNumberOfBuilds: 64, lineCoverageTargets: '50, 0, 0', methodCoverageTargets: '50, 0, 0', onlyStable: false, sourceEncoding: 'ASCII', zoomCoverageChart: false
}
}
stage("build") {
steps {
sh "python -m build"
// TODO Additional build steps go here
2023-06-22 16:35:31 +00:00
}
}
stage("test installation") {
steps {
sh "pip install dist/*.whl"
2023-06-27 14:19:06 +00:00
sh 'modvcfsamples ./tests/resources/test_files_shortened_haploid.vcf expected_out -n "GT" -g "4"'
2023-06-22 16:35:31 +00:00
}
}
stage("archive") {
steps {
archiveArtifacts artifacts: 'dist/*.tar.gz, dist/*.whl'
// TODO Additional archival or documentation steps go here
2023-06-22 16:35:31 +00:00
}
}
stage("publish") {
environment {
CREDS = credentials('rs-git-package-registry-ydeng')
}
when {
branch '**/main'
}
steps {
sh "python -m twine upload --repository-url https://git.reslate.systems/api/packages/${CREDS_USR}/pypi -u ${CREDS_USR} -p ${CREDS_PSW} --non-interactive --disable-progress-bar --verbose dist/*"
}
}
}
}