Skip to content

Commit c491d44

Browse files
authored
Merge pull request #3 from MultiSimOLab/mmaso/ci
Added CI
2 parents 5613440 + 9d32f0b commit c491d44

5 files changed

Lines changed: 31 additions & 11 deletions

File tree

.github/workflows/ci.yml

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
name: Tests
2+
3+
on: [pull_request, workflow_dispatch]
4+
5+
permissions: # needed to allow julia-actions/cache to delete old caches that it has created
6+
actions: write
7+
contents: read
8+
9+
jobs:
10+
test: # main CI tests
11+
runs-on: ${{ matrix.os }}
12+
strategy:
13+
fail-fast: false
14+
matrix:
15+
version: ['lts', '1', 'pre']
16+
arch: [x64]
17+
os: [ubuntu-latest]
18+
19+
steps:
20+
- uses: actions/checkout@v5
21+
- uses: julia-actions/setup-julia@v2
22+
with:
23+
version: ${{ matrix.version }}
24+
arch: ${{ matrix.arch }}
25+
- uses: julia-actions/cache@v2
26+
- uses: julia-actions/julia-buildpkg@v1
27+
- uses: julia-actions/julia-runtest@v1

Project.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,8 @@ PartitionedArrays = "5a9dfac6-5c52-46f7-8278-5e2210713be9"
2222
Plots = "91a5bcdd-55d7-5caf-9e0b-520d859cae80"
2323
Profile = "9abbd945-dff8-562f-b5e8-e1ebf5ef1b79"
2424
ProfileView = "c46f51b8-102a-5cf2-8d2c-8597cb0e0da7"
25-
Revise = "295af30f-e4ad-537b-8983-00126c2a3abe"
2625
Roots = "f2b01f46-fcfa-551c-844a-d8ac1e96c665"
2726
StaticArrays = "90137ffa-7385-5640-81b9-e52037218182"
27+
Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40"
2828
TimerOutputs = "a759f4b9-e2f1-59dc-863e-4aeb61b1ea8f"
2929
WriteVTK = "64499a7a-5c06-52f2-abe2-ccb03c286192"

src/PhysicalModels/PhysicalModels.jl

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,6 @@ using DrWatson
77
using ForwardDiff
88
using LinearAlgebra
99
using ..TensorAlgebra
10-
using ..TensorAlgebra: _δδ_μ_3D
11-
using ..TensorAlgebra: _δδ_λ_3D
12-
using ..TensorAlgebra: _δδ_μ_2D
13-
using ..TensorAlgebra: _δδ_λ_2D
1410
using ..TensorAlgebra: _∂H∂F_2D
1511
using ..TensorAlgebra: I3
1612
using ..TensorAlgebra: I9

test/TestConstitutiveModels/PhysicalModels.jl

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
using Gridap
22
using ForwardDiff
3+
using JSON
34
using StaticArrays
45
using Test
56
using HyperFEM.PhysicalModels
@@ -430,7 +431,8 @@ end
430431
return n_layers, Weights, Biases, ϵ, β
431432
end
432433

433-
data_filename = "test/models/test_NN_TEM.json"
434+
BASE_FOLDER = dirname(dirname(pathof(HyperFEM)))
435+
data_filename = joinpath(BASE_FOLDER, "test/models/test_NN_TEM.json")
434436
n_layers, Weights, Biases, ϵ, β = ExtractingInfo(data_filename)
435437

436438
model = ThermoElectroMech_PINNs(; W=Weights, b=Biases, ϵ=ϵ, β=β, nLayer=n_layers)

test/runtests.jl

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -7,11 +7,6 @@ using Gridap.FESpaces
77
using Gridap.CellData
88
using Gridap.TensorValues
99
using HyperFEM: jacobian, IterativeSolver, solve!
10-
using WriteVTK
11-
using Revise
12-
using DrWatson
13-
using JSON
14-
using ForwardDiff
1510
using BenchmarkTools
1611

1712
import Base.isapprox

0 commit comments

Comments
 (0)