diff --git a/Jenkinsfile b/Jenkinsfile index bdb116c..3be0382 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -12,5 +12,21 @@ pipeline{ sh 'python -m py_compile sources/webapp.py' } } + stage('Tests') { + agent { + docker { + image 'qnib/pytest' + } + } + steps { + sh 'pip install flask' + sh 'py.test --verbose --junit-xml test-reports/results.xml sources/test_webapp.py || true' + } + post { + always { + junit 'test-reports/results.xml' + } + } + } } } \ No newline at end of file