-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathJenkinsfile
More file actions
48 lines (46 loc) · 1.44 KB
/
Jenkinsfile
File metadata and controls
48 lines (46 loc) · 1.44 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
pipeline {
agent {
docker {
image 'python:3.13'
// The -u 0 flags means run commands inside the container
// as the user with uid = 0. This user is, by default, the
// root user. So it is effectively saying run the commands
// as root.
args '-u 0'
}
}
stages {
stage('Installing OS Dependencies') {
steps {
echo "[[ Install GMT ]]"
sh """
apt-get update
apt-get install -y gmt libgmt-dev libgmt6 ghostscript
"""
}
}
stage('Setting up env') {
steps {
echo "[[ Start virtual environment ]]"
sh """
cd ${env.WORKSPACE}
python -m venv .venv
source .venv/bin/activate
pip install -e .
"""
}
}
stage('Run regression tests') {
steps {
sh """
cd ${env.WORKSPACE}
source .venv/bin/activate
pytest --cov=visualisation --cov-report=html tests
python -m coverage html --skip-covered --skip-empty
python -m coverage report | sed 's/^/ /'
python -Im coverage report --fail-under=95
"""
}
}
}
}