diff --git a/Jenkinsfile b/Jenkinsfile index a018aab..b4fc4fb 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -1,7 +1,7 @@ pipeline{ agent none stages { - stage('Build'){ + stage('Build') { agent { docker { image 'python:2-alpine' @@ -11,6 +11,22 @@ pipeline{ sh 'python -m py_compile sources/add2vals.py sources/calc.py' } } + stage('Test') { + agent { + docker { + image 'qnib/pytest' + } + } + steps { + sh 'py.test --verbose --junit-xml test-reports/results.xml sources/test_calc.py' + } + post { + always { + junit 'test-reports/results.xml' + } + } + } } + } \ No newline at end of file