mirror of
https://github.com/octocat/Hello-World.git
synced 2026-06-04 14:17:09 +00:00
Fix Jenkinsfile to use shell commands for Linux environment
This commit is contained in:
parent
a4adc2e219
commit
55b75f4cf3
14
Jenkinsfile
vendored
14
Jenkinsfile
vendored
|
|
@ -16,9 +16,9 @@ pipeline {
|
|||
stage('Setup Python Environment') {
|
||||
steps {
|
||||
echo 'Setting up Python environment...'
|
||||
bat '''
|
||||
python --version
|
||||
python -m pip install --upgrade pip
|
||||
sh '''
|
||||
python3 --version || python --version
|
||||
python3 -m pip install --upgrade pip || python -m pip install --upgrade pip
|
||||
'''
|
||||
}
|
||||
}
|
||||
|
|
@ -26,8 +26,8 @@ pipeline {
|
|||
stage('Install Dependencies') {
|
||||
steps {
|
||||
echo 'Installing dependencies...'
|
||||
bat '''
|
||||
pip install -r requirements.txt
|
||||
sh '''
|
||||
pip3 install -r requirements.txt || pip install -r requirements.txt
|
||||
'''
|
||||
}
|
||||
}
|
||||
|
|
@ -35,7 +35,7 @@ pipeline {
|
|||
stage('Run Tests') {
|
||||
steps {
|
||||
echo 'Running payment tests...'
|
||||
bat '''
|
||||
sh '''
|
||||
pytest tests/ -v --junitxml=test-results.xml --html=test-report.html --self-contained-html
|
||||
'''
|
||||
}
|
||||
|
|
@ -44,7 +44,7 @@ pipeline {
|
|||
stage('Code Coverage') {
|
||||
steps {
|
||||
echo 'Generating code coverage report...'
|
||||
bat '''
|
||||
sh '''
|
||||
pytest tests/ --cov=src --cov-report=html --cov-report=xml
|
||||
'''
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user