Skip to content

Commit 1b340f6

Browse files
committed
Simplify IntegrationTest input format
1 parent 4cb1eec commit 1b340f6

File tree

2 files changed

+10
-18
lines changed

2 files changed

+10
-18
lines changed

.github/workflows/IntegrationTest.yml

Lines changed: 6 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,8 @@ on:
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:
@@ -36,8 +36,8 @@ jobs:
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

README.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -236,10 +236,10 @@ jobs:
236236
name: "IntegrationTest"
237237
strategy:
238238
matrix:
239-
repo:
240-
- 'ITensor/BlockSparseArrays.jl'
241-
- 'ITensor/NamedDimsArrays.jl'
242-
- 'ITensor/TensorAlgebra.jl'
239+
pkg:
240+
- 'BlockSparseArrays'
241+
- 'NamedDimsArrays'
242+
- 'TensorAlgebra'
243243
uses: "ITensor/ITensorActions/.github/workflows/IntegrationTest.yml@main"
244244
with:
245245
localregistry: "https://github.com/ITensor/ITensorRegistry.git"

0 commit comments

Comments
 (0)