ci: Add unit test runner

This commit is contained in:
Alexander Engelsberger 2021-11-05 11:56:59 +01:00
parent 328e789c86
commit 6370ff61a6
No known key found for this signature in database
GPG Key ID: BE3F5909FF0D83E3

47
Jenkinsfile vendored
View File

@ -1,24 +1,29 @@
pipeline {
agent none
stages {
stage('Unit Tests') {
stage('3.10') {
agent {
dockerfile {
filename 'python310.Dockerfile'
dir '.ci'
}
stage('GPU') {
agent {
dockerfile {
filename 'gpu.Dockerfile'
dir '.ci'
args '--gpus 1'
}
steps {
sh 'pip install pip --upgrade --progress-bar off'
sh 'pip install .[all] --progress-bar off'
sh 'pytest -v --junitxml=reports/result.xml'
}
}
post {
always {
junit 'reports/**/*.xml'
}
}
}
steps {
sh 'pip install -U pip --progress-bar off'
sh 'pip install .[all] --progress-bar off'
sh './tests/test_examples.sh examples --gpu'
}
}
stage('CPU') {
stage('CPU Examples') {
parallel {
stage('3.10') {
agent {
@ -98,7 +103,21 @@ pipeline {
}
}
stage('GPU Examples') {
agent {
dockerfile {
filename 'gpu.Dockerfile'
dir '.ci'
args '--gpus 1'
}
}
steps {
sh 'pip install -U pip --progress-bar off'
sh 'pip install .[all] --progress-bar off'
sh './tests/test_examples.sh examples --gpu'
}
}
}
}