ci: Add GitHub Actions workflows and fix test exports

Infrastructure improvements:

1. GitHub Actions CI workflow:
   - Test on Julia 1.10 (LTS) and latest stable
   - Ubuntu Linux runner
   - Code coverage via Codecov

2. Documentation build workflow:
   - Builds on push to master/main and PRs
   - Uses Documenter.jl with GitHub Pages deployment

3. Fix missing exports for tests:
   - Add Statistics to test dependencies

Tests still have API mismatches (49 failures) but infrastructure is now
This commit is contained in:
Jukka Aho
2025-11-09 01:35:00 +02:00
parent 0e831dc31a
commit 008d615c62
4 changed files with 83 additions and 1 deletions
+45
View File
@@ -0,0 +1,45 @@
name: CI
on:
push:
branches:
- master
- main
pull_request:
branches:
- master
- main
jobs:
test:
name: Julia ${{ matrix.version }} - ${{ matrix.os }}
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
version:
- '1.10' # LTS
- '1' # Latest stable
os:
- ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: julia-actions/setup-julia@v2
with:
version: ${{ matrix.version }}
- uses: julia-actions/cache@v2
- uses: julia-actions/julia-buildpkg@v1
- uses: julia-actions/julia-runtest@v1
- uses: julia-actions/julia-processcoverage@v1
- uses: codecov/codecov-action@v4
with:
files: lcov.info
token: ${{ secrets.CODECOV_TOKEN }}
fail_ci_if_error: false
+34
View File
@@ -0,0 +1,34 @@
name: Documentation
on:
push:
branches:
- master
- main
tags: '*'
pull_request:
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: julia-actions/setup-julia@v2
with:
version: '1'
- uses: julia-actions/cache@v2
- name: Install dependencies
run: |
julia --project=docs -e '
using Pkg
Pkg.develop(PackageSpec(path=pwd()))
Pkg.instantiate()'
- name: Build documentation
run: julia --project=docs docs/make.jl
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
DOCUMENTER_KEY: ${{ secrets.DOCUMENTER_KEY }}
+1 -1
View File
@@ -33,4 +33,4 @@ Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40"
TimerOutputs = "a759f4b9-e2f1-59dc-863e-4aeb61b1ea8f"
[targets]
test = ["Test"]
test = ["Test", "Statistics"]
+3
View File
@@ -222,6 +222,9 @@ export AbstractSolver, Solver, Nonlinear, NonlinearSolver, Linear, LinearSolver,
is_field_problem, is_boundary_problem
# include("solvers_modal.jl") # Requires Arpack for eigenvalue problems
# export Modal
# Re-export Analysis and related types from FEMBase (needed by tests)
export Analysis, AbstractAnalysis, add_problems!, run!
include("problems_contact.jl")
include("problems_contact_3d.jl")
#include("problems_contact_3d_autodiff.jl")