Skip to content

Commit

Permalink
CI baseline (#24)
Browse files Browse the repository at this point in the history
Add basic CI scripts for contributors and documentation.
  • Loading branch information
termi-official authored Sep 28, 2023
1 parent bceb1be commit cf8128f
Show file tree
Hide file tree
Showing 5 changed files with 103 additions and 11 deletions.
7 changes: 7 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# https://docs.github.com/github/administering-a-repository/configuration-options-for-dependency-updates
version: 2
updates:
- package-ecosystem: "github-actions"
directory: "/" # Location of package manifests
schedule:
interval: "monthly"
15 changes: 15 additions & 0 deletions .github/workflows/TagBot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
name: TagBot
on:
issue_comment:
types:
- created
workflow_dispatch:
jobs:
TagBot:
if: github.event_name == 'workflow_dispatch' || github.actor == 'JuliaTagBot'
runs-on: ubuntu-latest
steps:
- uses: JuliaRegistries/TagBot@v1
with:
token: ${{ secrets.GITHUB_TOKEN }}
ssh: ${{ secrets.DOCUMENTER_KEY }}
36 changes: 36 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
name: CI

on:
pull_request:
push:
branches: main
tags: '*'

jobs:
test:
name: Julia ${{ matrix.julia-version }} - ${{ matrix.os }} - ${{ github.event_name }}
runs-on: ${{ matrix.os }}
timeout-minutes: 40
continue-on-error: ${{ matrix.julia-version == 'nightly' }}
strategy:
matrix:
julia-version: ['1.9']
os: ['ubuntu-latest']
include:
- os: macOS-latest
julia-version: '1.9'
steps:
- uses: actions/checkout@v3
- uses: julia-actions/setup-julia@v1
with:
version: ${{ matrix.julia-version }}
- name: Install dependencies
run: julia --project=docs -e 'using Pkg; Pkg.instantiate(); Pkg.add(url="https://github.com/Ferrite-FEM/Ferrite.jl.git", rev="7e8a571"); Pkg.precompile()'
- uses: julia-actions/julia-runtest@v1
- uses: julia-actions/julia-processcoverage@v1
with:
directories: 'src,ext'
- uses: codecov/codecov-action@v3
with:
file: lcov.info

33 changes: 33 additions & 0 deletions .github/workflows/docs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
name: Documentation

on:
push:
branches:
- main
tags: '*'
pull_request:

jobs:
build:
runs-on: ubuntu-latest
timeout-minutes: 40
steps:
- uses: actions/checkout@v3
- uses: julia-actions/setup-julia@v1
with:
version: '1.9'
- uses: actions/cache@v3
with:
path: |
~/.julia/artifacts
~/.julia/packages
~/.julia/registries
key: .julia-docs-${{ hashFiles('docs/Project.toml', 'docs/Manifest.toml') }}
- name: Install dependencies
run: julia --project=docs -e 'using Pkg; Pkg.instantiate(); Pkg.add(url="https://github.com/Ferrite-FEM/Ferrite.jl.git", rev="7e8a571"); Pkg.precompile()'
- name: Build and deploy
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
DOCUMENTER_KEY: ${{ secrets.DOCUMENTER_KEY }}
GKSwstype: '100'
run: julia --project=docs --color=yes docs/make.jl
23 changes: 12 additions & 11 deletions docs/make.jl
Original file line number Diff line number Diff line change
Expand Up @@ -38,16 +38,17 @@ makedocs(
]
)

# if !liveserver
# @timeit dto "deploydocs" deploydocs(
# repo = "github.com/Ferrite-FEM/FerriteDistributed.jl.git",
# push_preview=true,
# versions = [
# "stable" => "v^",
# "v#.#",
# "dev" => "dev"
# ]
# )
# end
if !liveserver
@timeit dto "deploydocs" deploydocs(
repo = "github.com/Ferrite-FEM/FerriteDistributed.jl.git",
push_preview=true,
versions = [
"stable" => "v^",
"v#.#",
"dev" => "dev"
],
forcepush = true,
)
end

print_timer(dto)

0 comments on commit cf8128f

Please sign in to comment.