Skip to content

Commit 44fa544

Browse files
authored
Format workflows (#1702)
1 parent 68c3a00 commit 44fa544

18 files changed

Lines changed: 200 additions & 202 deletions

.github/dependabot.yml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
1-
# https://docs.github.com/github/administering-a-repository/configuration-options-for-dependency-updates
21
version: 2
32
updates:
43
- package-ecosystem: "github-actions"
5-
directory: "/" # Location of package manifests
4+
directory: "/"
65
schedule:
76
interval: "weekly"

.github/workflows/CompatHelper.yml

Lines changed: 13 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,19 @@
1-
name: CompatHelper
1+
name: "CompatHelper"
22
on:
33
schedule:
4-
- cron: 0 0 * * *
5-
workflow_dispatch:
4+
- cron: "0 0 * * *"
5+
workflow_dispatch: ~
66
jobs:
77
CompatHelper:
8-
runs-on: ubuntu-latest
8+
runs-on: "ubuntu-latest"
99
steps:
10-
- name: Pkg.add("CompatHelper")
11-
run: julia -e 'using Pkg; Pkg.add("CompatHelper")'
12-
- name: CompatHelper.main()
10+
- name: |-
11+
Pkg.add("CompatHelper")
12+
run: |-
13+
julia -e 'using Pkg; Pkg.add("CompatHelper")'
14+
- name: "CompatHelper.main()"
1315
env:
14-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
15-
COMPATHELPER_PRIV: ${{ secrets.DOCUMENTER_KEY }}
16-
run: julia -e 'using CompatHelper; CompatHelper.main(; subdirs=["", "NDTensors"])'
16+
GITHUB_TOKEN: "${{ secrets.GITHUB_TOKEN }}"
17+
COMPATHELPER_PRIV: "${{ secrets.DOCUMENTER_KEY }}"
18+
run: |-
19+
julia -e 'using CompatHelper; CompatHelper.main(; subdirs=["", "NDTensors"])'

.github/workflows/Downstream.yml

Lines changed: 32 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -1,39 +1,45 @@
1-
name: IntegrationTest
1+
name: "IntegrationTest"
22
on:
33
push:
4-
branches: [main]
5-
tags: [v*]
6-
pull_request:
7-
4+
branches:
5+
- "main"
6+
tags:
7+
- "v*"
8+
pull_request: ~
89
jobs:
910
test:
10-
name: ${{ matrix.package.repo }}
11-
runs-on: ${{ matrix.os }}
11+
name: "${{ matrix.package.repo }}"
12+
runs-on: "${{ matrix.os }}"
1213
strategy:
1314
fail-fast: false
1415
matrix:
15-
julia-version: [1]
16-
os: [ubuntu-latest]
16+
julia-version:
17+
- 1
18+
os:
19+
- "ubuntu-latest"
1720
package:
18-
- {user: ITensor, repo: ITensorGaussianMPS.jl}
19-
- {user: ITensor, repo: ITensorMPS.jl}
20-
- {user: ITensor, repo: ITensorUnicodePlots.jl}
21-
- {user: ITensor, repo: ITensorVisualizationBase.jl}
22-
21+
- user: "ITensor"
22+
repo: "ITensorGaussianMPS.jl"
23+
- user: "ITensor"
24+
repo: "ITensorMPS.jl"
25+
- user: "ITensor"
26+
repo: "ITensorUnicodePlots.jl"
27+
- user: "ITensor"
28+
repo: "ITensorVisualizationBase.jl"
2329
steps:
24-
- uses: actions/checkout@v6
25-
- uses: julia-actions/setup-julia@v2
30+
- uses: "actions/checkout@v6"
31+
- uses: "julia-actions/setup-julia@v2"
2632
with:
27-
version: ${{ matrix.julia-version }}
28-
arch: x64
29-
- uses: julia-actions/julia-buildpkg@latest
30-
- name: Clone Downstream
31-
uses: actions/checkout@v6
33+
version: "${{ matrix.julia-version }}"
34+
arch: "x64"
35+
- uses: "julia-actions/julia-buildpkg@latest"
36+
- name: "Clone Downstream"
37+
uses: "actions/checkout@v6"
3238
with:
33-
repository: ${{ matrix.package.user }}/${{ matrix.package.repo }}
34-
path: downstream
35-
- name: Load this and run the downstream tests
36-
shell: julia --color=yes --project=downstream {0}
39+
repository: "${{ matrix.package.user }}/${{ matrix.package.repo }}"
40+
path: "downstream"
41+
- name: "Load this and run the downstream tests"
42+
shell: "julia --color=yes --project=downstream {0}"
3743
run: |
3844
using Pkg
3945
try
@@ -49,9 +55,4 @@ jobs:
4955
@info "Not compatible with this release. No problem." exception=err
5056
exit(0) # Exit immediately, as a success
5157
end
52-
## - uses: julia-actions/julia-processcoverage@v1
53-
## - uses: codecov/codecov-action@v4
54-
## with:
55-
## token: ${{ secrets.CODECOV_TOKEN }}
56-
## file: lcov.info
57-
## fail_ci_if_error: true
58+

.github/workflows/FormatCheck.yml

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,17 @@
11
name: "Format Check"
2-
32
on:
43
pull_request_target:
5-
paths: ['**/*.jl']
6-
types: [opened, synchronize, reopened, ready_for_review]
7-
4+
paths:
5+
- "**/*.jl"
6+
types:
7+
- "opened"
8+
- "synchronize"
9+
- "reopened"
10+
- "ready_for_review"
811
permissions:
9-
contents: read
10-
actions: write
11-
pull-requests: write
12-
12+
contents: "read"
13+
actions: "write"
14+
pull-requests: "write"
1315
jobs:
1416
format-check:
1517
name: "Format Check"

.github/workflows/FormatPullRequest.yml

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,11 @@
11
name: "Format Pull Request"
2-
32
on:
43
schedule:
5-
- cron: '0 0 * * *'
6-
workflow_dispatch:
4+
- cron: "0 0 * * *"
5+
workflow_dispatch: ~
76
permissions:
8-
contents: write
9-
pull-requests: write
10-
7+
contents: "write"
8+
pull-requests: "write"
119
jobs:
1210
format-pull-request:
1311
name: "Format Pull Request"

.github/workflows/Register.yml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,16 @@
1-
name: Register Package
1+
name: "Register Package"
22
on:
33
workflow_dispatch:
44
inputs:
55
version:
6-
description: Version to register or component to bump
6+
description: "Version to register or component to bump"
77
required: true
88
jobs:
99
register:
10-
runs-on: ubuntu-latest
10+
runs-on: "ubuntu-latest"
1111
permissions:
12-
contents: write
12+
contents: "write"
1313
steps:
14-
- uses: julia-actions/RegisterAction@latest
14+
- uses: "julia-actions/RegisterAction@latest"
1515
with:
16-
token: ${{ secrets.GITHUB_TOKEN }}
16+
token: "${{ secrets.GITHUB_TOKEN }}"

.github/workflows/TagBot.yml

Lines changed: 19 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,31 +1,31 @@
1-
name: TagBot
1+
name: "TagBot"
22
on:
33
issue_comment:
44
types:
5-
- created
5+
- "created"
66
workflow_dispatch:
77
inputs:
88
lookback:
99
default: "3"
1010
permissions:
11-
actions: read
12-
checks: read
13-
contents: write
14-
deployments: read
15-
issues: read
16-
discussions: read
17-
packages: read
18-
pages: read
19-
pull-requests: read
20-
repository-projects: read
21-
security-events: read
22-
statuses: read
11+
actions: "read"
12+
checks: "read"
13+
contents: "write"
14+
deployments: "read"
15+
issues: "read"
16+
discussions: "read"
17+
packages: "read"
18+
pages: "read"
19+
pull-requests: "read"
20+
repository-projects: "read"
21+
security-events: "read"
22+
statuses: "read"
2323
jobs:
2424
TagBot:
25-
if: github.event_name == 'workflow_dispatch' || github.actor == 'JuliaTagBot'
26-
runs-on: ubuntu-latest
25+
if: "github.event_name == 'workflow_dispatch' || github.actor == 'JuliaTagBot'"
26+
runs-on: "ubuntu-latest"
2727
steps:
28-
- uses: JuliaRegistries/TagBot@v1
28+
- uses: "JuliaRegistries/TagBot@v1"
2929
with:
30-
token: ${{ secrets.GITHUB_TOKEN }}
31-
ssh: ${{ secrets.DOCUMENTER_KEY }}
30+
token: "${{ secrets.GITHUB_TOKEN }}"
31+
ssh: "${{ secrets.DOCUMENTER_KEY }}"

.github/workflows/VersionCheck.yml

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,9 @@
11
name: "Version Check"
2-
32
on:
4-
pull_request:
5-
3+
pull_request: ~
64
jobs:
75
version-check:
86
name: "Version Check"
97
uses: "ITensor/ITensorActions/.github/workflows/VersionCheck.yml@main"
108
with:
11-
localregistry: https://github.com/ITensor/ITensorRegistry.git
9+
localregistry: "https://github.com/ITensor/ITensorRegistry.git"
Lines changed: 18 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,31 +1,30 @@
1-
name: Documentation
2-
1+
name: "Documentation"
32
on:
43
push:
54
branches:
6-
- main
7-
tags: '*'
5+
- "main"
6+
tags: "*"
87
pull_request:
98
branches:
10-
- main
11-
tags: '*'
9+
- "main"
10+
tags: "*"
1211
workflow_dispatch:
1312
branches:
14-
- main
15-
tags: '*'
16-
13+
- "main"
14+
tags: "*"
1715
jobs:
1816
build:
19-
runs-on: ubuntu-latest
17+
runs-on: "ubuntu-latest"
2018
steps:
21-
- uses: actions/checkout@v6
22-
- uses: julia-actions/setup-julia@latest
19+
- uses: "actions/checkout@v6"
20+
- uses: "julia-actions/setup-julia@latest"
2321
with:
24-
version: '1'
25-
- name: Install dependencies
26-
run: julia --project=docs/ -e 'using Pkg; Pkg.develop(path="./NDTensors"); Pkg.develop(PackageSpec(path=pwd())); Pkg.instantiate()'
27-
- name: Build and deploy
22+
version: "1"
23+
- name: "Install dependencies"
24+
run: |-
25+
julia --project=docs/ -e 'using Pkg; Pkg.develop(path="./NDTensors"); Pkg.develop(PackageSpec(path=pwd())); Pkg.instantiate()'
26+
- name: "Build and deploy"
2827
env:
29-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # For authentication with GitHub Actions token
30-
DOCUMENTER_KEY: ${{ secrets.DOCUMENTER_KEY }}
31-
run: julia --project=docs/ docs/make.jl
28+
GITHUB_TOKEN: "${{ secrets.GITHUB_TOKEN }}"
29+
DOCUMENTER_KEY: "${{ secrets.DOCUMENTER_KEY }}"
30+
run: "julia --project=docs/ docs/make.jl"
Lines changed: 21 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -1,45 +1,43 @@
1-
name: Run ITensors base tests (macOS and Windows)
2-
1+
name: "Run ITensors base tests (macOS and Windows)"
32
on:
43
push:
54
branches:
6-
- main
7-
5+
- "main"
86
jobs:
97
test:
10-
name: Julia ${{ matrix.version }} - ${{ matrix.os }} - ${{ matrix.arch }} - ${{ matrix.threads }} thread(s)
11-
runs-on: ${{ matrix.os }}
8+
name: "Julia ${{ matrix.version }} - ${{ matrix.os }} - ${{ matrix.arch }} - ${{ matrix.threads }} thread(s)"
9+
runs-on: "${{ matrix.os }}"
1210
env:
13-
JULIA_NUM_THREADS: ${{ matrix.threads }}
11+
JULIA_NUM_THREADS: "${{ matrix.threads }}"
1412
strategy:
1513
matrix:
1614
version:
17-
- 'lts'
18-
- '1'
15+
- "lts"
16+
- "1"
1917
os:
20-
# - windows-latest # windows tests are failing for an unknow reason, disable for now
21-
- macOS-latest
18+
- "macOS-latest"
2219
threads:
23-
- '2'
20+
- "2"
2421
arch:
25-
- x64
22+
- "x64"
2623
exclude:
27-
# MacOS not available on x86
28-
- {os: 'macOS-latest', arch: 'x86'}
24+
- os: "macOS-latest"
25+
arch: "x86"
2926
steps:
30-
- uses: actions/checkout@v6
31-
- uses: julia-actions/setup-julia@latest
27+
- uses: "actions/checkout@v6"
28+
- uses: "julia-actions/setup-julia@latest"
3229
with:
33-
version: ${{ matrix.version }}
34-
arch: ${{ matrix.arch }}
35-
- name: Install Julia dependencies and run tests
36-
shell: julia {0}
30+
version: "${{ matrix.version }}"
31+
arch: "${{ matrix.arch }}"
32+
- name: "Install Julia dependencies and run tests"
33+
shell: "julia {0}"
3734
run: |
3835
using Pkg;
3936
Pkg.activate(temp=true);
4037
Pkg.develop(path="./NDTensors");
4138
Pkg.develop(path=".");
4239
Pkg.test("ITensors"; coverage=true, test_args=["base"]);
43-
- uses: julia-actions/julia-uploadcodecov@latest
40+
41+
- uses: "julia-actions/julia-uploadcodecov@latest"
4442
env:
45-
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
43+
CODECOV_TOKEN: "${{ secrets.CODECOV_TOKEN }}"

0 commit comments

Comments
 (0)