mirror of
https://github.com/julia-actions/julia-runtest.git
synced 2026-02-12 02:56:55 +08:00
Add test failure annotations on v1.8+ (#58)
Co-authored-by: Dilum Aluthge <dilum@aluthge.com>
This commit is contained in:
20
kwargs.jl
20
kwargs.jl
@@ -4,9 +4,25 @@ import Pkg
|
||||
|
||||
include(joinpath(@__DIR__, "autodetect-dependabot.jl"))
|
||||
|
||||
function kwargs(; coverage::Bool,
|
||||
force_latest_compatible_version::Union{Bool, Symbol},
|
||||
function kwargs(; coverage,
|
||||
force_latest_compatible_version,
|
||||
julia_args::AbstractVector{<:AbstractString}=String[])
|
||||
if coverage isa AbstractString
|
||||
coverage = parse(Bool, coverage)
|
||||
end
|
||||
coverage isa Bool || error("Unexpected type of `coverage`: $(typeof(coverage))")
|
||||
|
||||
if force_latest_compatible_version isa AbstractString
|
||||
res = tryparse(Bool, force_latest_compatible_version)
|
||||
if res === nothing
|
||||
res = Symbol(force_latest_compatible_version)
|
||||
end
|
||||
force_latest_compatible_version = res
|
||||
end
|
||||
if !(force_latest_compatible_version isa Union{Bool, Symbol})
|
||||
error("Unexpected type of `force_latest_compatible_version`: $(typeof(force_latest_compatible_version))")
|
||||
end
|
||||
|
||||
if !(force_latest_compatible_version isa Bool) && (force_latest_compatible_version != :auto)
|
||||
throw(ArgumentError("Invalid value for force_latest_compatible_version: $(force_latest_compatible_version)"))
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user