Skip to content
Merged
2 changes: 1 addition & 1 deletion .github/workflows/CheckCompatBounds.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,6 @@ on:
jobs:
check-compat-bounds:
name: "Check Compat Bounds"
uses: "ITensor/ITensorActions/.github/workflows/CheckCompatBounds.yml@main"
uses: "ITensor/ITensorActions/.github/workflows/CheckCompatBounds.yml@v1"
with:
localregistry: "https://github.com/ITensor/ITensorRegistry.git"
2 changes: 1 addition & 1 deletion .github/workflows/CompatHelper.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ permissions:
jobs:
compat-helper:
name: "CompatHelper"
uses: "ITensor/ITensorActions/.github/workflows/CompatHelper.yml@main"
uses: "ITensor/ITensorActions/.github/workflows/CompatHelper.yml@v1"
with:
localregistry: "https://github.com/ITensor/ITensorRegistry.git"
secrets: "inherit"
2 changes: 1 addition & 1 deletion .github/workflows/Documentation.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ concurrency:
jobs:
build-and-deploy-docs:
name: "Documentation"
uses: "ITensor/ITensorActions/.github/workflows/Documentation.yml@main"
uses: "ITensor/ITensorActions/.github/workflows/Documentation.yml@v1"
with:
localregistry: "https://github.com/ITensor/ITensorRegistry.git"
secrets:
Expand Down
8 changes: 2 additions & 6 deletions .github/workflows/FormatCheck.yml
Original file line number Diff line number Diff line change
@@ -1,16 +1,12 @@
name: "Format Check"
on:
pull_request_target:
pull_request:
types:
- "opened"
- "synchronize"
- "reopened"
- "ready_for_review"
permissions:
contents: "read"
actions: "write"
pull-requests: "write"
jobs:
format-check:
name: "Format Check"
uses: "ITensor/ITensorActions/.github/workflows/FormatCheck.yml@main"
uses: "ITensor/ITensorActions/.github/workflows/FormatCheck.yml@v1"
16 changes: 16 additions & 0 deletions .github/workflows/FormatCheckComment.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
name: "Format Check Comment"
on:
workflow_run:
workflows:
- "Format Check"
types:
- "completed"
jobs:
comment:
name: "Format Check Comment"
if: "github.event.workflow_run.event == 'pull_request'"
permissions:
pull-requests: "write"
actions: "read"
uses: "ITensor/ITensorActions/.github/workflows/FormatCheckComment.yml@v1"
secrets: "inherit"
2 changes: 1 addition & 1 deletion .github/workflows/FormatPullRequest.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,5 +12,5 @@ permissions:
jobs:
format-pull-request:
name: "Format Pull Request"
uses: "ITensor/ITensorActions/.github/workflows/FormatPullRequest.yml@main"
uses: "ITensor/ITensorActions/.github/workflows/FormatPullRequest.yml@v1"
secrets: "inherit"
24 changes: 5 additions & 19 deletions .github/workflows/IntegrationTest.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,8 @@ on:
push:
branches:
- "main"
pull_request_target:
tags: "*"
pull_request:
types:
- "opened"
- "synchronize"
Expand All @@ -13,24 +14,9 @@ on:
jobs:
integration-test:
name: "IntegrationTest"
strategy:
fail-fast: false
matrix:
pkg:
- "__none__"
uses: "ITensor/ITensorActions/.github/workflows/IntegrationTest.yml@main"
uses: "ITensor/ITensorActions/.github/workflows/IntegrationTest.yml@v1"
secrets: "inherit"
with:
localregistry: "https://github.com/ITensor/ITensorRegistry.git"
pkg: "${{ matrix.pkg }}"
integration-gate:
name: "IntegrationTest"
needs: "integration-test"
if: "${{ always() && needs.integration-test.result != 'skipped' }}"
runs-on: "ubuntu-latest"
steps:
- name: "Fail if any downstream integration test failed"
run: |
echo "integration-test.result = ${{ needs.integration-test.result }}"
test "${{ needs.integration-test.result }}" = "success"

pkgs: |
[]
9 changes: 7 additions & 2 deletions .github/workflows/IntegrationTestRequest.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,17 @@ on:
issue_comment:
types:
- "created"
permissions:
actions: "read"
contents: "read"
checks: "write"
pull-requests: "write"
jobs:
integrationrequest:
if: |
github.event.issue.pull_request &&
contains(fromJSON('["OWNER", "COLLABORATOR", "MEMBER"]'), github.event.comment.author_association)
uses: "ITensor/ITensorActions/.github/workflows/IntegrationTestRequest.yml@main"
uses: "ITensor/ITensorActions/.github/workflows/IntegrationTestRequest.yml@v1"
secrets: "inherit"
with:
localregistry: "https://github.com/ITensor/ITensorRegistry.git"
2 changes: 1 addition & 1 deletion .github/workflows/Registrator.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ permissions:
issues: "write"
jobs:
Register:
uses: "ITensor/ITensorActions/.github/workflows/Registrator.yml@main"
uses: "ITensor/ITensorActions/.github/workflows/Registrator.yml@v1"
with:
localregistry: "ITensor/ITensorRegistry"
secrets: "inherit"
2 changes: 1 addition & 1 deletion .github/workflows/TagBot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,5 +9,5 @@ env:
jobs:
TagBot:
if: "github.event_name == 'workflow_dispatch' || github.actor == 'JuliaTagBot'"
uses: "ITensor/ITensorActions/.github/workflows/TagBot.yml@main"
uses: "ITensor/ITensorActions/.github/workflows/TagBot.yml@v1"
secrets: "inherit"
3 changes: 2 additions & 1 deletion .github/workflows/Tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ on:
- "master"
- "main"
- "release-"
tags: "*"
paths-ignore:
- "docs/**"
pull_request:
Expand All @@ -31,7 +32,7 @@ jobs:
- "ubuntu-latest"
- "macOS-latest"
- "windows-latest"
uses: "ITensor/ITensorActions/.github/workflows/Tests.yml@main"
uses: "ITensor/ITensorActions/.github/workflows/Tests.yml@v1"
with:
group: "${{ matrix.group }}"
julia-version: "${{ matrix.version }}"
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/VersionCheck.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,6 @@ on:
jobs:
version-check:
name: "Version Check"
uses: "ITensor/ITensorActions/.github/workflows/VersionCheck.yml@main"
uses: "ITensor/ITensorActions/.github/workflows/VersionCheck.yml@v1"
with:
localregistry: "https://github.com/ITensor/ITensorRegistry.git"
2 changes: 1 addition & 1 deletion Project.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name = "ITensorPkgSkeleton"
uuid = "3d388ab1-018a-49f4-ae50-18094d5f71ea"
version = "0.3.56"
version = "0.3.57"
authors = ["ITensor developers <support@itensor.org> and contributors"]

[workspace]
Expand Down
4 changes: 2 additions & 2 deletions src/ITensorPkgSkeleton.jl
Original file line number Diff line number Diff line change
Expand Up @@ -99,9 +99,9 @@ function format_downstreampkgs(user_replacements)
pkgs =
haskey(user_replacements, :downstreampkgs) ? user_replacements.downstreampkgs : []
if isempty(pkgs)
downstreampkgs = " - \"__none__\""
downstreampkgs = ""
else
downstreampkgs = join([" - \"$(pkg)\"" for pkg in pkgs], "\n")
downstreampkgs = join([" \"$(pkg)\"" for pkg in pkgs], ",\n")
end
return merge(user_replacements, (; downstreampkgs))
end
Expand Down
2 changes: 1 addition & 1 deletion template/.github/workflows/CheckCompatBounds.yml.template
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,6 @@ on:
jobs:
check-compat-bounds:
name: "Check Compat Bounds"
uses: "ITensor/ITensorActions/.github/workflows/CheckCompatBounds.yml@main"
uses: "ITensor/ITensorActions/.github/workflows/CheckCompatBounds.yml@v1"
with:
localregistry: "https://github.com/ITensor/ITensorRegistry.git"
2 changes: 1 addition & 1 deletion template/.github/workflows/CompatHelper.yml.template
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ permissions:
jobs:
compat-helper:
name: "CompatHelper"
uses: "ITensor/ITensorActions/.github/workflows/CompatHelper.yml@main"
uses: "ITensor/ITensorActions/.github/workflows/CompatHelper.yml@v1"
with:
localregistry: "https://github.com/ITensor/ITensorRegistry.git"
secrets: "inherit"
2 changes: 1 addition & 1 deletion template/.github/workflows/Documentation.yml.template
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ concurrency:
jobs:
build-and-deploy-docs:
name: "Documentation"
uses: "ITensor/ITensorActions/.github/workflows/Documentation.yml@main"
uses: "ITensor/ITensorActions/.github/workflows/Documentation.yml@v1"
with:
localregistry: "https://github.com/ITensor/ITensorRegistry.git"
secrets:
Expand Down
8 changes: 2 additions & 6 deletions template/.github/workflows/FormatCheck.yml.template
Original file line number Diff line number Diff line change
@@ -1,16 +1,12 @@
name: "Format Check"
on:
pull_request_target:
pull_request:
types:
- "opened"
- "synchronize"
- "reopened"
- "ready_for_review"
permissions:
contents: "read"
actions: "write"
pull-requests: "write"
jobs:
format-check:
name: "Format Check"
uses: "ITensor/ITensorActions/.github/workflows/FormatCheck.yml@main"
uses: "ITensor/ITensorActions/.github/workflows/FormatCheck.yml@v1"
16 changes: 16 additions & 0 deletions template/.github/workflows/FormatCheckComment.yml.template
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
name: "Format Check Comment"
on:
workflow_run:
workflows:
- "Format Check"
types:
- "completed"
jobs:
comment:
name: "Format Check Comment"
if: "github.event.workflow_run.event == 'pull_request'"
permissions:
pull-requests: "write"
actions: "read"
uses: "ITensor/ITensorActions/.github/workflows/FormatCheckComment.yml@v1"
secrets: "inherit"
2 changes: 1 addition & 1 deletion template/.github/workflows/FormatPullRequest.yml.template
Original file line number Diff line number Diff line change
Expand Up @@ -12,5 +12,5 @@ permissions:
jobs:
format-pull-request:
name: "Format Pull Request"
uses: "ITensor/ITensorActions/.github/workflows/FormatPullRequest.yml@main"
uses: "ITensor/ITensorActions/.github/workflows/FormatPullRequest.yml@v1"
secrets: "inherit"
23 changes: 4 additions & 19 deletions template/.github/workflows/IntegrationTest.yml.template
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,8 @@ on:
push:
branches:
- "main"
pull_request_target:
tags: "*"
pull_request:
types:
- "opened"
- "synchronize"
Expand All @@ -13,24 +14,8 @@ on:
jobs:
integration-test:
name: "IntegrationTest"
strategy:
fail-fast: false
matrix:
pkg:
{DOWNSTREAMPKGS}
uses: "ITensor/ITensorActions/.github/workflows/IntegrationTest.yml@main"
uses: "ITensor/ITensorActions/.github/workflows/IntegrationTest.yml@v1"
secrets: "inherit"
with:
localregistry: "https://github.com/ITensor/ITensorRegistry.git"
pkg: "${{ matrix.pkg }}"
integration-gate:
name: "IntegrationTest"
needs: "integration-test"
if: "${{ always() && needs.integration-test.result != 'skipped' }}"
runs-on: "ubuntu-latest"
steps:
- name: "Fail if any downstream integration test failed"
run: |
echo "integration-test.result = ${{ needs.integration-test.result }}"
test "${{ needs.integration-test.result }}" = "success"

pkgs: |{DOWNSTREAMPKGS}
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,17 @@ on:
issue_comment:
types:
- "created"
permissions:
actions: "read"
contents: "read"
checks: "write"
pull-requests: "write"
jobs:
integrationrequest:
if: |
github.event.issue.pull_request &&
contains(fromJSON('["OWNER", "COLLABORATOR", "MEMBER"]'), github.event.comment.author_association)
uses: "ITensor/ITensorActions/.github/workflows/IntegrationTestRequest.yml@main"
uses: "ITensor/ITensorActions/.github/workflows/IntegrationTestRequest.yml@v1"
secrets: "inherit"
with:
localregistry: "https://github.com/ITensor/ITensorRegistry.git"
2 changes: 1 addition & 1 deletion template/.github/workflows/Registrator.yml.template
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ permissions:
issues: "write"
jobs:
Register:
uses: "ITensor/ITensorActions/.github/workflows/Registrator.yml@main"
uses: "ITensor/ITensorActions/.github/workflows/Registrator.yml@v1"
with:
localregistry: "ITensor/ITensorRegistry"
secrets: "inherit"
2 changes: 1 addition & 1 deletion template/.github/workflows/TagBot.yml.template
Original file line number Diff line number Diff line change
Expand Up @@ -9,5 +9,5 @@ env:
jobs:
TagBot:
if: "github.event_name == 'workflow_dispatch' || github.actor == 'JuliaTagBot'"
uses: "ITensor/ITensorActions/.github/workflows/TagBot.yml@main"
uses: "ITensor/ITensorActions/.github/workflows/TagBot.yml@v1"
secrets: "inherit"
3 changes: 2 additions & 1 deletion template/.github/workflows/Tests.yml.template
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ on:
- "master"
- "main"
- "release-"
tags: "*"
paths-ignore:
- "docs/**"
pull_request:
Expand All @@ -31,7 +32,7 @@ jobs:
- "ubuntu-latest"
- "macOS-latest"
- "windows-latest"
uses: "ITensor/ITensorActions/.github/workflows/Tests.yml@main"
uses: "ITensor/ITensorActions/.github/workflows/Tests.yml@v1"
with:
group: "${{ matrix.group }}"
julia-version: "${{ matrix.version }}"
Expand Down
2 changes: 1 addition & 1 deletion template/.github/workflows/VersionCheck.yml.template
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,6 @@ on:
jobs:
version-check:
name: "Version Check"
uses: "ITensor/ITensorActions/.github/workflows/VersionCheck.yml@main"
uses: "ITensor/ITensorActions/.github/workflows/VersionCheck.yml@v1"
with:
localregistry: "https://github.com/ITensor/ITensorRegistry.git"
8 changes: 6 additions & 2 deletions test/test_basics.jl
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,9 @@ using Test: @test, @testset
joinpath(path, "NewPkg", ".github", "workflows", "IntegrationTest.yml"),
"r"
) do io
return contains(read(io, String), "- \"__none__\"")
content = read(io, String)
return contains(content, "pkgs: |") == true &&
!contains(content, "\"__none__\"")
end
end
@testset "generate with downstream tests" begin
Expand All @@ -53,7 +55,9 @@ using Test: @test, @testset
),
"r"
) do io
return contains(read(io, String), "- \"DownstreamPkg\"")
content = read(io, String)
return contains(content, "pkgs: |") ==
true && contains(content, "\"DownstreamPkg\"")
end
else
@test !isdir(joinpath(path, "NewPkg", ".github"))
Expand Down
Loading