Skip to content

Commit

Permalink
Tweak history: don't show days without data. (#180)
Browse files Browse the repository at this point in the history
  • Loading branch information
maleadt authored Oct 18, 2023
1 parent 950e04d commit 7bebb85
Showing 1 changed file with 6 additions and 7 deletions.
13 changes: 6 additions & 7 deletions src/jobs/PkgEvalJob.jl
Original file line number Diff line number Diff line change
Expand Up @@ -726,10 +726,9 @@ end
# PkgEvalJob Reporting #
########################

const COLOR_MAP = map(('' => ("#60F", "crash"),
'' => ("#F03", "fail"),
'' => ("#FF0", "skip"),
'' => ("#666", "no data"),
const COLOR_MAP = map(('' => ("#666", "skip"),
'' => ("#60F", "crash"),
'' => ("#F03", "fail"),
'' => ("#0F0", "ok"))) do (char, (color, title))
Regex("($char+)") => SubstitutionString("<span style=\"color: $color\" title=\"$title\">\\1</span>")
end
Expand Down Expand Up @@ -839,7 +838,7 @@ end
# Markdown Report Generation #
#----------------------------#

@enum HistoricalStatus crash=0 fail=1 skip=3 no_data=4 ok=6
@enum HistoricalStatus skip=0 crash=2 fail=4 ok=6
function get_history(cfg, days=30)
# Ensure repo is available locally
root_dir = reportdir(cfg)
Expand Down Expand Up @@ -871,9 +870,9 @@ function get_history(cfg, days=30)
json = JSON.Parser.parse(IOBuffer(c))
for (pkg, result) in json["tests"]
if !haskey(history, pkg)
history[pkg] = fill(no_data, days)
history[pkg] = HistoricalStatus[]
end
history[pkg][i] = getproperty(@__MODULE__, Symbol(result["status"]))
push!(history[pkg], getproperty(@__MODULE__, Symbol(result["status"])))
end
end

Expand Down

0 comments on commit 7bebb85

Please sign in to comment.