Skip to content

Commit 199622a

Browse files
switch coverage plugin
1 parent f0057d0 commit 199622a

File tree

3 files changed

+25
-13
lines changed

3 files changed

+25
-13
lines changed

.coveragerc

Lines changed: 3 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,9 @@
11
# .coveragerc to control coverage.py
22

33
[run]
4-
# Also report branch coverage
5-
branch = True
4+
# skip test files
5+
omit =
6+
*/test*/*
67
# Set concurrency type for correct coverage of multi-processing code
78
concurrency = multiprocessing
89

@@ -14,12 +15,3 @@ source = climada/
1415
exclude_also =
1516
# Main code is not run
1617
if __name__ == .__main__.:
17-
18-
# Abtract methods are not run
19-
@(abc\.)?abstractmethod
20-
21-
# Never fail when reporting
22-
ignore_errors = True
23-
24-
[html]
25-
directory = coverage

script/jenkins/branches/Jenkinsfile

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,17 @@ pipeline {
3636
post {
3737
always {
3838
junit 'tests_xml/*.xml'
39-
cobertura coberturaReportFile: 'coverage.xml'
39+
recordCoverage(
40+
qualityGates: [[
41+
baseline: 'MODIFIED_FILES',
42+
metric: 'LINE',
43+
threshold: 60.0
44+
]],
45+
tools: [[
46+
parser: 'COBERTURA',
47+
pattern: 'coverage.xml'
48+
]]
49+
)
4050
}
4151
}
4252
}

script/jenkins/ci_night/Jenkinsfile

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,17 @@ pipeline {
2929
post {
3030
always {
3131
junit 'tests_xml/*.xml'
32-
cobertura coberturaReportFile: 'coverage.xml', enableNewApi: false
32+
recordCoverage(
33+
qualityGates: [[
34+
baseline: 'PROJECT',
35+
metric: 'LINE',
36+
threshold: 80.0
37+
]],
38+
tools: [[
39+
parser: 'COBERTURA',
40+
pattern: 'coverage.xml'
41+
]]
42+
)
3343
}
3444
}
3545
}

0 commit comments

Comments
 (0)