8
8
default : " 1"
9
9
required : false
10
10
type : string
11
- repo :
12
- description : " Repository name, including the group/user, such as ITensor/ ITensors.jl"
11
+ pkg :
12
+ description : " Package name without `.jl`, i.e. ITensors (for ITensors.jl). "
13
13
required : true
14
14
type : string
15
15
localregistry :
36
36
- uses : julia-actions/julia-buildpkg@latest
37
37
with :
38
38
localregistry : " ${{ inputs.localregistry }}"
39
- - name : Load this and run the downstream tests
40
- shell : julia --color=yes --project=test_downstream {0}
39
+ - name : Run the downstream tests
40
+ shell : julia --color=yes --project=downstream {0}
41
41
run : |
42
42
using Pkg
43
43
# If provided add local registries
@@ -49,19 +49,11 @@ jobs:
49
49
end
50
50
end
51
51
try
52
- repo_and_subdir = split("${{ inputs.repo }}", ':')
53
- repo = string(first(repo_and_subdir))
54
- pkg_name = string(first(split(last(split(repo, '/')), '.')))
55
- path = "downstream"
56
- if length(repo_and_subdir) > 1
57
- length(repo_and_subdir) == 2 || error("Bad repo input.")
58
- pkg_name = string(last(repo_and_subdir))
59
- end
60
- Pkg.add(pkg_name)
52
+ Pkg.add(PackageSpec(name=pkg))
61
53
# force it to use this PR's version of the package
62
54
Pkg.develop(PackageSpec(path=".")) # resolver may fail with main deps
63
55
Pkg.update()
64
- Pkg.test(pkg_name ) # resolver may fail with test time deps
56
+ Pkg.test(PackageSpec(name=pkg) ) # resolver may fail with test time deps
65
57
catch err
66
58
err isa Pkg.Resolve.ResolverError || rethrow()
67
59
# If we can't resolve that means this is incompatible by SemVer and this is fine
0 commit comments