Skip to content

Commit 2f62631

Browse files
committed
Add test_arg input and populate to test_args in test(), rebase on main branch
1 parent 7e64b54 commit 2f62631

File tree

3 files changed

+14
-2
lines changed

3 files changed

+14
-2
lines changed

action.yml

+4
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,9 @@ inputs:
3838
allow_reresolve:
3939
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'
4040
default: 'true'
41+
test_arg:
42+
description: 'Argument string that is passed on to test.'
43+
default: ''
4144

4245
runs:
4346
using: 'composite'
@@ -74,3 +77,4 @@ runs:
7477
CHECK_BOUNDS: ${{ inputs.check_bounds }}
7578
COMPILED_MODULES: ${{ inputs.compiled_modules }}
7679
ALLOW_RERESOLVE: ${{ inputs.allow_reresolve }}
80+
TEST_ARG: ${{ inputs.test_arg }}

kwargs.jl

+7-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,9 @@ include(joinpath(@__DIR__, "autodetect-dependabot.jl"))
77
function kwargs(; coverage,
88
force_latest_compatible_version,
99
allow_reresolve,
10-
julia_args::AbstractVector{<:AbstractString}=String[])
10+
julia_args::AbstractVector{<:AbstractString}=String[],
11+
test_arg::AbstractString="",
12+
)
1113
if coverage isa AbstractString
1214
coverage = parse(Bool, coverage)
1315
end
@@ -55,6 +57,10 @@ function kwargs(; coverage,
5557
if VERSION >= v"1.9"
5658
kwargs_dict[:allow_reresolve] = parse(Bool, allow_reresolve)
5759
end
60+
61+
if test_arg != "" # avoid ambiguity by empty string in test_args
62+
kwargs_dict[:test_args] = [test_arg]
63+
end
5864

5965
return kwargs_dict
6066
end

test_harness.jl

+3-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,9 @@ kwargs = Kwargs.kwargs(; coverage=ENV["COVERAGE"],
44
force_latest_compatible_version=ENV["FORCE_LATEST_COMPATIBLE_VERSION"],
55
allow_reresolve=ENV["ALLOW_RERESOLVE"],
66
julia_args=[string("--check-bounds=", ENV["CHECK_BOUNDS"]),
7-
string("--compiled-modules=", ENV["COMPILED_MODULES"])])
7+
string("--compiled-modules=", ENV["COMPILED_MODULES"])],
8+
test_arg=ENV["TEST_ARG"],
9+
)
810

911
if parse(Bool, ENV["ANNOTATE"]) && v"1.8pre" < VERSION < v"1.9.0-beta3"
1012
push!(LOAD_PATH, "@tests-logger-env") # access dependencies

0 commit comments

Comments
 (0)