Add test stage to Jenkinsfile
This commit is contained in:
parent
971d6db14d
commit
a57602918d
1 changed files with 20 additions and 1 deletions
19
Jenkinsfile
vendored
19
Jenkinsfile
vendored
|
@ -12,6 +12,25 @@ pipeline {
|
||||||
stash(name: 'compiled-results', includes: 'sources/*.py*')
|
stash(name: 'compiled-results', includes: 'sources/*.py*')
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
stage('Test') {
|
||||||
|
agent {
|
||||||
|
docker {
|
||||||
|
image 'qnib/pytest'
|
||||||
|
}
|
||||||
|
}
|
||||||
|
steps {
|
||||||
|
sh 'py.test --junit-xml test-reports/results.xml sources/test_calc.py'
|
||||||
|
}
|
||||||
|
post {
|
||||||
|
always {
|
||||||
|
junit 'test-reports/results.xml'
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
Loading…
Reference in a new issue