Skip to content

Commit 9ba4352

Browse files
author
Alan Christie
committed
- Test for parallel jobs and Python2 and Python3 agents
1 parent b6c49b7 commit 9ba4352

File tree

1 file changed

+37
-11
lines changed

1 file changed

+37
-11
lines changed

Jenkinsfile

Lines changed: 37 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -12,21 +12,47 @@ pipeline {
1212
// Python Tests
1313
// --------------------------------------------------------------------
1414

15-
stage ('Python2 Test') {
15+
stage('Unit Test') {
1616

17-
agent {
18-
label 'python-slave'
19-
}
17+
parallel {
18+
19+
stage('Python 2.7') {
20+
21+
agent {
22+
label 'python-slave'
23+
}
24+
25+
steps {
26+
27+
sh 'pip install -r package-requirements.txt'
28+
29+
dir('src/python') {
30+
sh 'coverage run setup.py test'
31+
sh 'coverage report'
32+
sh 'pyroma .'
33+
}
34+
35+
}
36+
}
37+
38+
stage('Python 3.6') {
39+
40+
agent {
41+
label 'python3-slave'
42+
}
43+
44+
steps {
45+
46+
sh 'pip install -r package-requirements.txt'
2047

21-
steps {
48+
dir('src/python') {
49+
sh 'coverage run setup.py test'
50+
sh 'coverage report'
51+
sh 'pyroma .'
52+
}
2253

23-
sh 'pip install -r package-requirements.txt'
54+
}
2455

25-
dir('src/python') {
26-
sh 'coverage run setup.py test'
27-
sh 'coverage report'
28-
sh 'pyroma .'
29-
sh 'python setup.py bdist_wheel'
3056
}
3157

3258
}

0 commit comments

Comments
 (0)