add test stage

This commit is contained in:
joe 2021-03-11 14:50:27 +08:00
parent 33417371fb
commit c2143f1681
2 changed files with 18 additions and 0 deletions

3
.gitignore vendored
View file

@ -98,3 +98,6 @@ ENV/
# mypy
.mypy_cache/
.idea/
test-reports/

15
Jenkinsfile vendored
View file

@ -15,5 +15,20 @@ pipeline {
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'
}
}
}
}
}