From 93c31675b837a7f736e90c5e290fc60eec90e68e Mon Sep 17 00:00:00 2001 From: Mpho raf Date: Wed, 19 Jan 2022 08:34:01 +0200 Subject: [PATCH] Added a testing stage --- Jenkinsfile | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/Jenkinsfile b/Jenkinsfile index aa92a38..e55e915 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -12,5 +12,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' + } + } + } } } \ No newline at end of file