Skip to content

Commit 3e2c4ce

Browse files
authored
add Ferrite integration tests (#157)
* add Ferrite integration tests * Update .github/workflows/integration.yml
1 parent 003e65f commit 3e2c4ce

4 files changed

Lines changed: 38 additions & 4 deletions

File tree

.github/workflows/CI.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ concurrency:
1313
cancel-in-progress: ${{ startsWith(github.ref, 'refs/pull/') }}
1414
jobs:
1515
test:
16-
name: Julia ${{ matrix.version }} - ${{ matrix.os }} - ${{ matrix.arch }} - ${{ github.event_name }}
16+
name: Julia ${{ matrix.version }} - ${{ matrix.os }} - ${{ github.event_name }}
1717
runs-on: ${{ matrix.os }}
1818
strategy:
1919
fail-fast: false

.github/workflows/integration.yml

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ concurrency:
1313
cancel-in-progress: ${{ startsWith(github.ref, 'refs/pull/') }}
1414
jobs:
1515
test:
16-
name: Integration ${{ matrix.project }} - ${{ matrix.version }} - ${{ matrix.os }} - ${{ github.event_name }}
16+
name: ${{ matrix.project }} (Julia ${{ matrix.version }} - ${{ matrix.os }} - ${{ github.event_name }})
1717
runs-on: ${{ matrix.os }}
1818
strategy:
1919
fail-fast: false
@@ -24,12 +24,13 @@ jobs:
2424
- ubuntu-latest
2525
project:
2626
- Oceananigans
27+
- Ferrite
2728
steps:
2829
- uses: actions/checkout@v6
2930
# Using `juliaup` over `setup-julia` so we can access beta versions easier
30-
- uses: julia-actions/install-juliaup@v1
31+
- uses: julia-actions/setup-julia@v2
3132
with:
32-
julia-version: ${{ matrix.version }}
33+
version: ${{ matrix.version }}
3334
- uses: julia-actions/cache@v2
3435
- name: Integration tests
3536
run: julia --color=yes --project=integration integration/runtest.jl ${{ matrix.project }}

integration/Ferrite/Project.toml

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
[deps]
2+
BlockArrays = "8e7c35d0-a365-5155-bbbb-fb81a777f24e"
3+
ExplicitImports = "7d51a73a-1435-4ff3-83d9-f097790105c7"
4+
Ferrite = "c061ca5d-56c9-439f-9c0e-210fe06d3992"
5+
Metis = "2679e427-3c69-5b7f-982b-ece356f1e94b"
6+
7+
[compat]
8+
Ferrite = "=1.3.0"
9+
10+
[sources]
11+
ExplicitImports = {path = "../.."}

integration/Ferrite/check.jl

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
using Ferrite, ExplicitImports, Metis, BlockArrays
2+
# modified from
3+
# https://github.com/Ferrite-FEM/Ferrite.jl/blob/3b19a33331fa0b8a93b5e7adfe2339766b5c4af4/.github/workflows/Check.yml#L55-L73
4+
# to ignore `(:(×), :(⊗), :(⊡), :(⋅))`
5+
6+
allow_unanalyzable = (ColoringAlgorithm,) # baremodules
7+
check_no_implicit_imports(Ferrite; allow_unanalyzable, ignore=(:(×), :(), :(), :()))
8+
check_no_stale_explicit_imports(Ferrite; allow_unanalyzable)
9+
check_all_qualified_accesses_via_owners(Ferrite)
10+
check_no_self_qualified_accesses(Ferrite)
11+
# Check extension modules
12+
for ext in (:FerriteBlockArrays, :FerriteMetis)
13+
extmod = Base.get_extension(Ferrite, ext)
14+
if extmod !== nothing
15+
check_no_implicit_imports(extmod)
16+
check_no_stale_explicit_imports(extmod)
17+
check_all_qualified_accesses_via_owners(extmod)
18+
check_no_self_qualified_accesses(extmod)
19+
else
20+
@warn "$(ext) extensions not available."
21+
end
22+
end

0 commit comments

Comments
 (0)