Skip to content

Commit f954ef7

Browse files
authored
CI workflows and docs (#1)
1 parent 19112c5 commit f954ef7

File tree

9 files changed

+158
-77
lines changed

9 files changed

+158
-77
lines changed

.github/dependabot.yml

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

.github/workflows/CI.yml

Lines changed: 79 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,79 @@
1+
name: CI
2+
on:
3+
push:
4+
branches:
5+
- main
6+
tags: ['*']
7+
pull_request:
8+
workflow_dispatch:
9+
concurrency:
10+
# Skip intermediate builds: always.
11+
# Cancel intermediate builds: only if it is a pull request build.
12+
group: ${{ github.workflow }}-${{ github.ref }}
13+
cancel-in-progress: ${{ startsWith(github.ref, 'refs/pull/') }}
14+
jobs:
15+
test:
16+
name: Julia ${{ matrix.version }} - ${{ matrix.os }} - ${{ matrix.arch }} - ${{ github.event_name }}
17+
runs-on: ${{ matrix.os }}
18+
timeout-minutes: 60
19+
permissions: # needed to allow julia-actions/cache to proactively delete old caches that it has created
20+
actions: write
21+
contents: read
22+
strategy:
23+
fail-fast: false
24+
matrix:
25+
version:
26+
- '1.6'
27+
- '1'
28+
os:
29+
- ubuntu-latest
30+
- macOS-latest
31+
- windows-latest
32+
arch:
33+
- x64
34+
steps:
35+
- uses: actions/checkout@v4
36+
- uses: julia-actions/setup-julia@v1
37+
with:
38+
version: ${{ matrix.version }}
39+
arch: ${{ matrix.arch }}
40+
- uses: julia-actions/cache@v1
41+
- uses: julia-actions/julia-buildpkg@v1
42+
- uses: julia-actions/julia-runtest@v1
43+
- uses: julia-actions/julia-processcoverage@v1
44+
- uses: codecov/codecov-action@v4
45+
with:
46+
files: lcov.info
47+
token: ${{ secrets.CODECOV_TOKEN }}
48+
fail_ci_if_error: false
49+
docs:
50+
name: Documentation
51+
runs-on: ubuntu-latest
52+
permissions:
53+
actions: write # needed to allow julia-actions/cache to proactively delete old caches that it has created
54+
contents: write
55+
statuses: write
56+
steps:
57+
- uses: actions/checkout@v4
58+
- uses: julia-actions/setup-julia@v1
59+
with:
60+
version: '1'
61+
- uses: julia-actions/cache@v1
62+
- name: Configure doc environment
63+
shell: julia --project=docs --color=yes {0}
64+
run: |
65+
using Pkg
66+
Pkg.develop(PackageSpec(path=pwd()))
67+
Pkg.instantiate()
68+
- uses: julia-actions/julia-buildpkg@v1
69+
- uses: julia-actions/julia-docdeploy@v1
70+
env:
71+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
72+
DOCUMENTER_KEY: ${{ secrets.DOCUMENTER_KEY }}
73+
- name: Run doctests
74+
shell: julia --project=docs --color=yes {0}
75+
run: |
76+
using Documenter: DocMeta, doctest
77+
using ITensorGaussianMPS
78+
DocMeta.setdocmeta!(ITensorGaussianMPS, :DocTestSetup, :(using ITensorGaussianMPS); recursive=true)
79+
doctest(ITensorGaussianMPS)

.github/workflows/Register.yml

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
name: Register Package
2+
on:
3+
workflow_dispatch:
4+
inputs:
5+
version:
6+
description: Version to register or component to bump
7+
required: true
8+
jobs:
9+
register:
10+
runs-on: ubuntu-latest
11+
permissions:
12+
contents: write
13+
steps:
14+
- uses: julia-actions/RegisterAction@latest
15+
with:
16+
token: ${{ secrets.GITHUB_TOKEN }}

.github/workflows/TagBot.yml

Lines changed: 20 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,28 @@
11
name: TagBot
22
on:
3-
schedule:
4-
- cron: 0 0 * * *
3+
issue_comment:
4+
types:
5+
- created
56
workflow_dispatch:
7+
inputs:
8+
lookback:
9+
default: "3"
10+
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
623
jobs:
724
TagBot:
25+
if: github.event_name == 'workflow_dispatch' || github.actor == 'JuliaTagBot'
826
runs-on: ubuntu-latest
927
steps:
1028
- uses: JuliaRegistries/TagBot@v1

.github/workflows/test.yml

Lines changed: 0 additions & 31 deletions
This file was deleted.

NEWS.md

Lines changed: 0 additions & 44 deletions
This file was deleted.

docs/Project.toml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
[deps]
2+
Documenter = "e30172f5-a6a5-5a46-863b-614d45cd2de4"

docs/make.jl

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
using ITensorGaussianMPS
2+
using Documenter
3+
4+
DocMeta.setdocmeta!(
5+
ITensorGaussianMPS, :DocTestSetup, :(using ITensorGaussianMPS); recursive=true
6+
)
7+
8+
makedocs(;
9+
modules=[ITensorGaussianMPS],
10+
authors="ITensor developers",
11+
sitename="ITensorGaussianMPS.jl",
12+
format=Documenter.HTML(;
13+
canonical="https://ITensor.github.io/ITensorGaussianMPS.jl",
14+
edit_link="main",
15+
assets=String[],
16+
),
17+
pages=["Home" => "index.md"],
18+
)
19+
20+
deploydocs(; repo="github.com/ITensor/ITensorGaussianMPS.jl", devbranch="main")

docs/src/index.md

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
```@meta
2+
CurrentModule = ITensorGaussianMPS
3+
```
4+
5+
# ITensorGaussianMPS
6+
7+
Documentation for [ITensorGaussianMPS](https://github.com/ITensor/ITensorGaussianMPS.jl).
8+
9+
```@index
10+
```
11+
12+
```@autodocs
13+
Modules = [ITensorGaussianMPS]
14+
```

0 commit comments

Comments
 (0)