Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Tweak history: don't show days without data. #180

Merged
merged 1 commit into from
Oct 18, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading