File tree Expand file tree Collapse file tree 3 files changed +25
-13
lines changed
Expand file tree Collapse file tree 3 files changed +25
-13
lines changed Original file line number Diff line number Diff line change 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
78concurrency = multiprocessing
89
@@ -14,12 +15,3 @@ source = climada/
1415exclude_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
Original file line number Diff line number Diff line change @@ -39,7 +39,17 @@ pipeline {
3939 post {
4040 always {
4141 junit ' tests_xml/*.xml'
42- cobertura coberturaReportFile : ' coverage.xml'
42+ recordCoverage(
43+ qualityGates : [[
44+ baseline : ' MODIFIED_FILES' ,
45+ metric : ' LINE' ,
46+ threshold : 60.0
47+ ]],
48+ tools : [[
49+ parser : ' COBERTURA' ,
50+ pattern : ' coverage.xml'
51+ ]]
52+ )
4353 }
4454 }
4555}
Original file line number Diff line number Diff 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}
You can’t perform that action at this time.
0 commit comments