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

Support specifying allow_reresolve #107

Merged
merged 1 commit into from
Apr 16, 2024
Merged
Show file tree
Hide file tree
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
4 changes: 4 additions & 0 deletions action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,9 @@ inputs:
compiled_modules:
description: 'Whether to run tests with `compiled-modules`. For possible values, refer to https://docs.julialang.org/en/v1/manual/command-line-interface/#command-line-interface'
default: 'yes'
allow_reresolve:
description: 'Whether to allow re-resolving of package versions in the test environment. Only effective on Julia 1.9+. Options: true | false. Default value: true'
default: 'true'

runs:
using: 'composite'
Expand Down Expand Up @@ -70,3 +73,4 @@ runs:
FORCE_LATEST_COMPATIBLE_VERSION: ${{ inputs.force_latest_compatible_version }}
CHECK_BOUNDS: ${{ inputs.check_bounds }}
COMPILED_MODULES: ${{ inputs.compiled_modules }}
ALLOW_RERESOLVE: ${{ inputs.allow_reresolve }}
5 changes: 5 additions & 0 deletions kwargs.jl
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ include(joinpath(@__DIR__, "autodetect-dependabot.jl"))

function kwargs(; coverage,
force_latest_compatible_version,
allow_reresolve,
julia_args::AbstractVector{<:AbstractString}=String[])
if coverage isa AbstractString
coverage = parse(Bool, coverage)
Expand Down Expand Up @@ -51,6 +52,10 @@ function kwargs(; coverage,
kwargs_dict[:force_latest_compatible_version] = force_latest_compatible_version::Bool
end

if VERSION >= v"1.9"
kwargs_dict[:allow_reresolve] = parse(Bool, allow_reresolve)
end

return kwargs_dict
end

Expand Down
5 changes: 3 additions & 2 deletions test_harness.jl
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ import Pkg
include("kwargs.jl")
kwargs = Kwargs.kwargs(; coverage=ENV["COVERAGE"],
force_latest_compatible_version=ENV["FORCE_LATEST_COMPATIBLE_VERSION"],
allow_reresolve=ENV["ALLOW_RERESOLVE"],
julia_args=[string("--check-bounds=", ENV["CHECK_BOUNDS"]),
string("--compiled-modules=", ENV["COMPILED_MODULES"])])

Expand All @@ -11,7 +12,7 @@ if parse(Bool, ENV["ANNOTATE"]) && v"1.8pre" < VERSION < v"1.9.0-beta3"
global_logger(GitHubActionsLogger())
include("test_logger.jl")
pop!(LOAD_PATH)
TestLogger.test(; kwargs...)
TestLogger.test(; kwargs...)
else
Pkg.test(; kwargs...)
Pkg.test(; kwargs...)
end
Loading