blob: 42756ece3ce51fb506c2c0aa201cb5f2683d8c19 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
|
properties([
pipelineTriggers([cron('H * * * *')])
])
node {
checkout scm
def packages = ["python_moonutilities","python_moondb","python_moonclient"]
def subtests = [:]
for (x in packages) {
def pkg = x
subtests[pkg] = {
withDockerContainer('wukongsun/moon_python_unit_test') {
stage("Install prerequisites for package ${pkg}") {
sh("pip install pytest requests_mock requests --upgrade")
sh("cd ${pkg} && pip install -r tests/unit_python/requirements.txt && pip install .")
}
stage("Unit test for package ${pkg}") {
sh "cd ${pkg}/tests/unit_python && pytest ."
}
}
}
}
parallel subtests
}
|