File tree Expand file tree Collapse file tree 1 file changed +11
-2
lines changed
.buildkite/pipelines/scheduled/coverage Expand file tree Collapse file tree 1 file changed +11
-2
lines changed Original file line number Diff line number Diff line change @@ -91,7 +91,7 @@ function print_coverage_summary(
91
91
cov_pct = floor (Int, cov_lines/ tot_lines * 100 )
92
92
end
93
93
@info " $(description) : $(cov_pct) % ($(cov_lines) /$(tot_lines) )"
94
- return nothing
94
+ return (; cov_pct)
95
95
end
96
96
97
97
function buildkite_env (name:: String )
198
198
sort! (fcs; by = fc -> fc. filename);
199
199
200
200
print_coverage_summary .(fcs);
201
- print_coverage_summary (fcs, " Total" )
201
+ const total_cov_pct = print_coverage_summary (fcs, " Total" ). cov_pct
202
202
203
203
let
204
204
git_info = coveralls_buildkite_query_git_info ()
217
217
# In order to upload to Codecov, you need to have the `CODECOV_TOKEN` environment variable defined.
218
218
Coverage. Codecov. submit_generic (fcs, kwargs)
219
219
end
220
+
221
+ if total_cov_pct < 50
222
+ msg = string (
223
+ " The total coverage is less than 50%. This should never happen, " ,
224
+ " so it means that something has probably gone wrong with the code coverage job." ,
225
+ )
226
+ @error msg total_cov_pct
227
+ throw (ErrorException (msg))
228
+ end
You can’t perform that action at this time.
0 commit comments