-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Update template to use organization actions (#11)
- Loading branch information
Showing
10 changed files
with
159 additions
and
202 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
name: "Documentation" | ||
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
tags: '*' | ||
pull_request: | ||
schedule: | ||
- cron: '1 4 * * 4' | ||
|
||
concurrency: | ||
group: ${{ github.workflow }}-${{ github.ref }} | ||
cancel-in-progress: ${{ github.ref_name != github.event.repository.default_branch || github.ref != 'refs/tags/v*' }} | ||
|
||
jobs: | ||
build-and-deploy-docs: | ||
name: "Documentation" | ||
uses: "ITensor/ITensorActions/.github/workflows/Documentation.yml@main" | ||
with: | ||
localregistry: https://github.com/ITensor/ITensorRegistry.git | ||
secrets: "inherit" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,35 +1,13 @@ | ||
name: Format check | ||
name: "Format Check" | ||
|
||
on: | ||
push: | ||
branches: [main] | ||
tags: [v*] | ||
branches: | ||
- 'main' | ||
tags: '*' | ||
pull_request: | ||
|
||
jobs: | ||
format: | ||
format-check: | ||
name: "Format Check" | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: julia-actions/setup-julia@v2 | ||
with: | ||
version: 1 | ||
- name: Install JuliaFormatter and format | ||
run: | | ||
julia -e 'using Pkg; Pkg.add(PackageSpec(name="JuliaFormatter"))' | ||
julia -e 'using JuliaFormatter; format(".", verbose=true)' | ||
- name: Check format | ||
run: | | ||
julia -e ' | ||
out = Cmd(`git diff --name-only`) |> read |> String | ||
if out == "" | ||
exit(0) | ||
else | ||
@error "The following files have not been formatted:" | ||
write(stdout, out) | ||
out_diff = Cmd(`git diff`) |> read |> String | ||
@error "Diff:" | ||
write(stdout, out_diff) | ||
exit(1) | ||
@error "" | ||
end' | ||
uses: "ITensor/ITensorActions/.github/workflows/FormatCheck.yml@main" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,39 +1,15 @@ | ||
name: Literate check | ||
name: "Literate Check" | ||
|
||
on: | ||
push: | ||
branches: [main] | ||
tags: [v*] | ||
branches: | ||
- 'main' | ||
tags: '*' | ||
pull_request: | ||
|
||
jobs: | ||
literate: | ||
name: "Literate Check" | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: julia-actions/setup-julia@v2 | ||
with: | ||
version: 1 | ||
- name: Install Literate and generate docs | ||
run: | | ||
julia -e ' | ||
using Pkg | ||
Pkg.develop(PackageSpec(path=pwd())) | ||
Pkg.instantiate() | ||
Pkg.add(PackageSpec(name="Literate"))' | ||
julia -e 'include("docs/make_readme.jl")' | ||
- name: Check if docs need to be updated | ||
run: | | ||
julia -e ' | ||
out = Cmd(`git diff --name-only`) |> read |> String | ||
if out == "" | ||
exit(0) | ||
else | ||
@error "The docs are outdated, rerun Literate to regenerate them." | ||
write(stdout, out) | ||
out_diff = Cmd(`git diff`) |> read |> String | ||
@error "Diff:" | ||
write(stdout, out_diff) | ||
exit(1) | ||
@error "" | ||
end' | ||
uses: "ITensor/ITensorActions/.github/workflows/LiterateCheck.yml@main" | ||
with: | ||
localregistry: https://github.com/ITensor/ITensorRegistry.git |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
name: Tests | ||
on: | ||
push: | ||
branches: | ||
- 'master' | ||
- 'main' | ||
- 'release-' | ||
tags: '*' | ||
paths-ignore: | ||
- 'docs/**' | ||
pull_request: | ||
workflow_dispatch: | ||
|
||
concurrency: | ||
group: ${{ github.workflow }}-${{ github.ref }} | ||
# Cancel intermediate builds: only if it is a pull request build. | ||
cancel-in-progress: ${{ startsWith(github.ref, 'refs/pull/') }} | ||
|
||
jobs: | ||
tests: | ||
name: "Tests" | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
version: | ||
- 'lts' # minimal supported version | ||
- '1' # latest released Julia version | ||
# group: | ||
# - 'core' | ||
# - 'optional' | ||
os: | ||
- ubuntu-latest | ||
- macOS-latest | ||
- windows-latest | ||
uses: "ITensor/ITensorActions/.github/workflows/Tests.yml@main" | ||
with: | ||
group: "${{ matrix.group }}" | ||
julia-version: "${{ matrix.version }}" | ||
os: "${{ matrix.os }}" | ||
localregistry: https://github.com/ITensor/ITensorRegistry.git | ||
secrets: | ||
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
name: "Documentation" | ||
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
tags: '*' | ||
pull_request: | ||
schedule: | ||
- cron: '1 4 * * 4' | ||
|
||
concurrency: | ||
group: ${{ github.workflow }}-${{ github.ref }} | ||
cancel-in-progress: ${{ github.ref_name != github.event.repository.default_branch || github.ref != 'refs/tags/v*' }} | ||
|
||
jobs: | ||
build-and-deploy-docs: | ||
name: "Documentation" | ||
uses: "ITensor/ITensorActions/.github/workflows/Documentation.yml@main" | ||
with: | ||
localregistry: https://github.com/ITensor/ITensorRegistry.git | ||
secrets: "inherit" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,35 +1,13 @@ | ||
name: Format check | ||
name: "Format Check" | ||
|
||
on: | ||
push: | ||
branches: [main] | ||
tags: [v*] | ||
branches: | ||
- 'main' | ||
tags: '*' | ||
pull_request: | ||
|
||
jobs: | ||
format: | ||
format-check: | ||
name: "Format Check" | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: julia-actions/setup-julia@v2 | ||
with: | ||
version: 1 | ||
- name: Install JuliaFormatter and format | ||
run: | | ||
julia -e 'using Pkg; Pkg.add(PackageSpec(name="JuliaFormatter"))' | ||
julia -e 'using JuliaFormatter; format(".", verbose=true)' | ||
- name: Check format | ||
run: | | ||
julia -e ' | ||
out = Cmd(`git diff --name-only`) |> read |> String | ||
if out == "" | ||
exit(0) | ||
else | ||
@error "The following files have not been formatted:" | ||
write(stdout, out) | ||
out_diff = Cmd(`git diff`) |> read |> String | ||
@error "Diff:" | ||
write(stdout, out_diff) | ||
exit(1) | ||
@error "" | ||
end' | ||
uses: "ITensor/ITensorActions/.github/workflows/FormatCheck.yml@main" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,39 +1,15 @@ | ||
name: Literate check | ||
name: "Literate Check" | ||
|
||
on: | ||
push: | ||
branches: [main] | ||
tags: [v*] | ||
branches: | ||
- 'main' | ||
tags: '*' | ||
pull_request: | ||
|
||
jobs: | ||
literate: | ||
name: "Literate Check" | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: julia-actions/setup-julia@v2 | ||
with: | ||
version: 1 | ||
- name: Install Literate and generate docs | ||
run: | | ||
julia -e ' | ||
using Pkg | ||
Pkg.develop(PackageSpec(path=pwd())) | ||
Pkg.instantiate() | ||
Pkg.add(PackageSpec(name="Literate"))' | ||
julia -e 'include("docs/make_readme.jl")' | ||
- name: Check if docs need to be updated | ||
run: | | ||
julia -e ' | ||
out = Cmd(`git diff --name-only`) |> read |> String | ||
if out == "" | ||
exit(0) | ||
else | ||
@error "The docs are outdated, rerun Literate to regenerate them." | ||
write(stdout, out) | ||
out_diff = Cmd(`git diff`) |> read |> String | ||
@error "Diff:" | ||
write(stdout, out_diff) | ||
exit(1) | ||
@error "" | ||
end' | ||
uses: "ITensor/ITensorActions/.github/workflows/LiterateCheck.yml@main" | ||
with: | ||
localregistry: https://github.com/ITensor/ITensorRegistry.git |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
name: Tests | ||
on: | ||
push: | ||
branches: | ||
- 'master' | ||
- 'main' | ||
- 'release-' | ||
tags: '*' | ||
paths-ignore: | ||
- 'docs/**' | ||
pull_request: | ||
workflow_dispatch: | ||
|
||
concurrency: | ||
group: ${{ github.workflow }}-${{ github.ref }} | ||
# Cancel intermediate builds: only if it is a pull request build. | ||
cancel-in-progress: ${{ startsWith(github.ref, 'refs/pull/') }} | ||
|
||
jobs: | ||
tests: | ||
name: "Tests" | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
version: | ||
- 'lts' # minimal supported version | ||
- '1' # latest released Julia version | ||
# group: | ||
# - 'core' | ||
# - 'optional' | ||
os: | ||
- ubuntu-latest | ||
- macOS-latest | ||
- windows-latest | ||
uses: "ITensor/ITensorActions/.github/workflows/Tests.yml@main" | ||
with: | ||
group: "${{ matrix.group }}" | ||
julia-version: "${{ matrix.version }}" | ||
os: "${{ matrix.os }}" | ||
localregistry: https://github.com/ITensor/ITensorRegistry.git | ||
secrets: | ||
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} |
Oops, something went wrong.