88 default : " 1"
99 required : false
1010 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). "
1313 required : true
1414 type : string
1515 localregistry :
3636 - uses : julia-actions/julia-buildpkg@latest
3737 with :
3838 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}
4141 run : |
4242 using Pkg
4343 # If provided add local registries
@@ -49,19 +49,11 @@ jobs:
4949 end
5050 end
5151 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))
6153 # force it to use this PR's version of the package
6254 Pkg.develop(PackageSpec(path=".")) # resolver may fail with main deps
6355 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
6557 catch err
6658 err isa Pkg.Resolve.ResolverError || rethrow()
6759 # If we can't resolve that means this is incompatible by SemVer and this is fine
0 commit comments