Corrected directory in jenkins pipeline

This commit is contained in:
Marcin-Ramotowski 2025-05-03 20:21:02 +00:00
parent dcd9a39b46
commit fb260a0f6d

12
Jenkinsfile vendored
View File

@ -14,13 +14,15 @@ pipeline {
stage('Test python app') { stage('Test python app') {
steps { steps {
script { script {
sh ''' dir('api') {
python3 -m venv env sh '''
env/bin/pip install -r requirements.txt pytest python3 -m venv env
env/bin/pytest . --junit-xml=pytest_junit.xml env/bin/pip install -r requirements.txt pytest
''' env/bin/pytest . --junit-xml=pytest_junit.xml
'''
} }
} }
}
post { post {
always { always {
junit testResults: '**/*pytest_junit.xml' junit testResults: '**/*pytest_junit.xml'