Skip to content

Commit

Permalink
Update Coverage.jl and warn on failures.
Browse files Browse the repository at this point in the history
  • Loading branch information
maleadt committed Mar 31, 2023
1 parent d3da883 commit e16e9eb
Showing 1 changed file with 12 additions and 2 deletions.
14 changes: 12 additions & 2 deletions hooks/post-command
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,18 @@ fi
julia -e 'using Pkg
Pkg.UPDATED_REGISTRY_THIS_SESSION[] = true
Pkg.activate("julia-coverage", shared=true)
Pkg.add(PackageSpec(name="Coverage", uuid="a2441757-f6aa-5fb2-8edb-039e3f45d037", version="1.4"))
Pkg.add(PackageSpec(name="Coverage", uuid="a2441757-f6aa-5fb2-8edb-039e3f45d037", version="1.6"))
using Coverage
pf = vcat(map(process_folder, ARGS)...)
foreach(clean_folder, ARGS)
haskey(ENV, "CODECOV_TOKEN") && Codecov.submit(pf)' "${dirs[@]}"
if !haskey(ENV, "CODECOV_TOKEN")
run(`buildkite-agent annotate "Cannot submit coverage without Codecov key." --style "error" --context "ctx-coverage"`)
else
try
Codecov.submit(pf)
catch err
@error "Error submitting to Codecov" exception=(err, catch_backtrace())
run(`buildkite-agent annotate "Failed to submit coverage." --style "error" --context "ctx-coverage"`)
end
end' "${dirs[@]}"

0 comments on commit e16e9eb

Please sign in to comment.