Skip to content

Commit c8e8ca7

Browse files
committed
set up CI: Docs, compat helper and register
1 parent b4c68b2 commit c8e8ca7

File tree

7 files changed

+118
-0
lines changed

7 files changed

+118
-0
lines changed

.github/workflows/CI.yml

Lines changed: 62 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,62 @@
1+
name: CI
2+
on:
3+
- push
4+
- pull_request
5+
jobs:
6+
test:
7+
name: Julia ${{ matrix.version }} - ${{ matrix.os }} - ${{ matrix.arch }} - ${{ github.event_name }}
8+
runs-on: ${{ matrix.os }}
9+
strategy:
10+
fail-fast: false
11+
matrix:
12+
version:
13+
- '1'
14+
os:
15+
- ubuntu-latest
16+
arch:
17+
- x64
18+
steps:
19+
- uses: actions/checkout@v2
20+
- uses: julia-actions/setup-julia@v1
21+
with:
22+
version: ${{ matrix.version }}
23+
arch: ${{ matrix.arch }}
24+
- uses: actions/cache@v1
25+
env:
26+
cache-name: cache-artifacts
27+
with:
28+
path: ~/.julia/artifacts
29+
key: ${{ runner.os }}-test-${{ env.cache-name }}-${{ hashFiles('**/Project.toml') }}
30+
restore-keys: |
31+
${{ runner.os }}-test-${{ env.cache-name }}-
32+
${{ runner.os }}-test-
33+
${{ runner.os }}-
34+
- uses: julia-actions/julia-buildpkg@v1
35+
- uses: julia-actions/julia-runtest@v1
36+
- uses: julia-actions/julia-processcoverage@v1
37+
- uses: codecov/codecov-action@v1
38+
with:
39+
file: lcov.info
40+
docs:
41+
name: Documentation
42+
runs-on: ubuntu-latest
43+
steps:
44+
- uses: actions/checkout@v2
45+
- uses: julia-actions/setup-julia@v1
46+
with:
47+
version: '1'
48+
- run: |
49+
julia --project=docs -e '
50+
using Pkg
51+
Pkg.develop(PackageSpec(path=pwd()))
52+
Pkg.instantiate()'
53+
- run: |
54+
julia --project=docs -e '
55+
using Documenter: DocMeta, doctest
56+
using NetworkLayout
57+
DocMeta.setdocmeta!(NetworkLayout, :DocTestSetup, :(using NetworkLayout); recursive=true)
58+
doctest(NetworkLayout)'
59+
- run: julia --project=docs docs/make.jl
60+
env:
61+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
62+
DOCUMENTER_KEY: ${{ secrets.DOCUMENTER_KEY }}

.github/workflows/CompatHelper.yml

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
name: CompatHelper
2+
on:
3+
schedule:
4+
- cron: 0 0 * * *
5+
workflow_dispatch:
6+
jobs:
7+
CompatHelper:
8+
runs-on: ubuntu-latest
9+
steps:
10+
- name: Pkg.add("CompatHelper")
11+
run: julia -e 'using Pkg; Pkg.add("CompatHelper")'
12+
- name: CompatHelper.main()
13+
env:
14+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
15+
COMPATHELPER_PRIV: ${{ secrets.DOCUMENTER_KEY }}
16+
run: julia -e 'using CompatHelper; CompatHelper.main()'

.github/workflows/register.yml

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
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+
steps:
12+
- uses: julia-actions/RegisterAction@latest
13+
with:
14+
token: ${{ secrets.GITHUB_TOKEN }}

docs/Project.toml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
[deps]
2+
NetworkLayout = "46757867-2c16-5918-afeb-47bfcb05e46a"

docs/make.jl

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
using NetworkLayout
2+
using Documenter
3+
4+
DocMeta.setdocmeta!(NetworkLayout, :DocTestSetup, :(using NetworkLayout); recursive=true)
5+
6+
makedocs(; modules=[NetworkLayout],
7+
repo="https://github.com/JuliaGraphs/NetworkLayout.jl/blob/{commit}{path}#{line}",
8+
sitename="NetworkLayout.jl",
9+
format=Documenter.HTML(; prettyurls=get(ENV, "CI", "false") == "true",
10+
canonical="https://juliagraphs.org/NetworkLayout.jl", assets=String[]),
11+
pages=["Home" => "index.md",])
12+
13+
# if gh_pages branch gets to big, check out
14+
# https://juliadocs.github.io/Documenter.jl/stable/man/hosting/#gh-pages-Branch
15+
deploydocs(;repo="github.com/JuliaGraphs/NetworkLayout.jl",
16+
push_preview=true)

docs/servedocs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
#!/bin/zsh
2+
julia -e 'using LiveServer; serve(dir="build")'

docs/src/index.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
```@meta
2+
CurrentModule = NetworkLayout
3+
```
4+
5+
# NetworkLayout
6+
This is the Documentation for [NetworkLayout](https://github.com/JuliaGraphs/NetworkLayout.jl).

0 commit comments

Comments
 (0)