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(
9191 cov_pct = floor (Int, cov_lines/ tot_lines * 100 )
9292 end
9393 @info " $(description) : $(cov_pct) % ($(cov_lines) /$(tot_lines) )"
94- return nothing
94+ return (; cov_pct)
9595end
9696
9797function buildkite_env (name:: String )
198198sort! (fcs; by = fc -> fc. filename);
199199
200200print_coverage_summary .(fcs);
201- print_coverage_summary (fcs, " Total" )
201+ const total_cov_pct = print_coverage_summary (fcs, " Total" ). cov_pct
202202
203203let
204204 git_info = coveralls_buildkite_query_git_info ()
217217 # In order to upload to Codecov, you need to have the `CODECOV_TOKEN` environment variable defined.
218218 Coverage. Codecov. submit_generic (fcs, kwargs)
219219end
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