Skip to content

Commit 064f8dc

Browse files
committed
Put back new CI files
1 parent 7e4cb6d commit 064f8dc

File tree

5 files changed

+219
-0
lines changed

5 files changed

+219
-0
lines changed

.github/workflows/CompatHelper.yml

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
on:
2+
schedule:
3+
- cron: 0 0 * * *
4+
workflow_dispatch:
5+
permissions:
6+
contents: write
7+
pull-requests: write
8+
jobs:
9+
CompatHelper:
10+
runs-on: ubuntu-latest
11+
steps:
12+
- name: Check if Julia is already available in the PATH
13+
id: julia_in_path
14+
run: which julia
15+
continue-on-error: true
16+
- name: Install Julia, but only if it is not already available in the PATH
17+
uses: julia-actions/setup-julia@v1
18+
with:
19+
version: "1"
20+
arch: ${{ runner.arch }}
21+
if: steps.julia_in_path.outcome != 'success'
22+
- name: "Add the General registry via Git"
23+
run: |
24+
import Pkg
25+
ENV["JULIA_PKG_SERVER"] = ""
26+
Pkg.Registry.add("General")
27+
shell: julia --color=yes {0}
28+
- name: "Install CompatHelper"
29+
run: |
30+
import Pkg
31+
name = "CompatHelper"
32+
uuid = "aa819f21-2bde-4658-8897-bab36330d9b7"
33+
version = "3"
34+
Pkg.add(; name, uuid, version)
35+
shell: julia --color=yes {0}
36+
- name: "Run CompatHelper"
37+
run: |
38+
import CompatHelper
39+
CompatHelper.main()
40+
shell: julia --color=yes {0}
41+
env:
42+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
43+
COMPATHELPER_PRIV: ${{ secrets.DOCUMENTER_KEY }}

.github/workflows/SpellCheck.yml

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
name: Spell Check
2+
3+
on: [pull_request]
4+
5+
jobs:
6+
typos-check:
7+
name: Spell Check with Typos
8+
runs-on: ubuntu-latest
9+
steps:
10+
- name: Checkout Actions Repository
11+
uses: actions/checkout@v4
12+
- name: Check spelling
13+
uses: crate-ci/typos@v1.18.0

.github/workflows/TagBot.yml

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
name: TagBot
2+
on:
3+
issue_comment:
4+
types:
5+
- created
6+
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
23+
jobs:
24+
TagBot:
25+
if: github.event_name == 'workflow_dispatch' || github.actor == 'JuliaTagBot'
26+
runs-on: ubuntu-latest
27+
steps:
28+
- uses: JuliaRegistries/TagBot@v1
29+
with:
30+
token: ${{ secrets.GITHUB_TOKEN }}
31+
ssh: ${{ secrets.DOCUMENTER_KEY }}

.github/workflows/ci.yml

Lines changed: 116 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,116 @@
1+
name: CI
2+
on:
3+
pull_request:
4+
branches:
5+
- main
6+
- dev
7+
paths-ignore:
8+
- "docs/**"
9+
push:
10+
branches:
11+
- main
12+
paths-ignore:
13+
- "docs/**"
14+
jobs:
15+
formatter:
16+
runs-on: ${{ matrix.os }}
17+
strategy:
18+
matrix:
19+
julia-version: [1]
20+
julia-arch: [x86]
21+
os: [ubuntu-latest]
22+
steps:
23+
- uses: julia-actions/setup-julia@latest
24+
with:
25+
version: ${{ matrix.julia-version }}
26+
27+
- uses: actions/checkout@v4
28+
- name: Install JuliaFormatter and format
29+
# This will use the latest version by default but you can set the version like so:
30+
#
31+
# julia -e 'using Pkg; Pkg.add(PackageSpec(name="JuliaFormatter", version="0.13.0"))'
32+
run: |
33+
julia -e 'using Pkg; Pkg.add(PackageSpec(name="JuliaFormatter", version="1.0.50"))'
34+
julia -e 'using JuliaFormatter; format(".", verbose=true)'
35+
- name: Format check
36+
run: |
37+
julia -e '
38+
out = Cmd(`git diff`) |> read |> String
39+
if out == ""
40+
exit(0)
41+
else
42+
@error "Some files have not been formatted !!!"
43+
write(stdout, out)
44+
exit(1)
45+
end'
46+
test:
47+
name: Julia ${{ matrix.version }} - ${{ matrix.os }} - ${{ matrix.arch }} - ${{ github.event_name }}
48+
runs-on: ${{ matrix.os }}
49+
strategy:
50+
fail-fast: false
51+
matrix:
52+
version:
53+
- "1.8"
54+
- "1" # automatically expands to the latest stable 1.x release of Julia
55+
- nightly
56+
os:
57+
- ubuntu-latest
58+
arch:
59+
- x64
60+
- x86
61+
include:
62+
# test macOS and Windows with latest Julia only
63+
- os: macOS-latest
64+
arch: x64
65+
version: 1
66+
- os: windows-latest
67+
arch: x64
68+
version: 1
69+
- os: windows-latest
70+
arch: x86
71+
version: 1
72+
steps:
73+
- uses: actions/checkout@v4
74+
- uses: julia-actions/setup-julia@v1
75+
with:
76+
version: ${{ matrix.version }}
77+
arch: ${{ matrix.arch }}
78+
- uses: actions/cache@v4
79+
env:
80+
cache-name: cache-artifacts
81+
with:
82+
path: ~/.julia/artifacts
83+
key: ${{ runner.os }}-test-${{ env.cache-name }}-${{ hashFiles('**/Project.toml') }}
84+
restore-keys: |
85+
${{ runner.os }}-test-${{ env.cache-name }}-
86+
${{ runner.os }}-test-
87+
${{ runner.os }}-
88+
- uses: julia-actions/julia-buildpkg@v1
89+
- uses: julia-actions/julia-runtest@v1
90+
- uses: julia-actions/julia-processcoverage@v1
91+
- uses: codecov/codecov-action@v4
92+
with:
93+
file: lcov.info
94+
docs:
95+
name: Documentation
96+
runs-on: ubuntu-latest
97+
steps:
98+
- uses: actions/checkout@v4
99+
- uses: julia-actions/setup-julia@v1
100+
with:
101+
version: "1"
102+
- run: |
103+
julia --project=docs -e '
104+
using Pkg
105+
Pkg.develop(PackageSpec(path=pwd()))
106+
Pkg.instantiate()'
107+
- run: |
108+
julia --project=docs -e '
109+
using Documenter: DocMeta, doctest
110+
using CompositionalNetworks
111+
DocMeta.setdocmeta!(CompositionalNetworks, :DocTestSetup, :(using CompositionalNetworks); recursive=true)
112+
doctest(CompositionalNetworks)'
113+
- run: julia --project=docs docs/make.jl
114+
env:
115+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
116+
DOCUMENTER_KEY: ${{ secrets.DOCUMENTER_KEY }}

.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 }}

0 commit comments

Comments
 (0)