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

33
Jenkinsfile vendored
View File

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