diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 0000000..4e597a9 --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,27 @@ +name: Tests + +on: [pull_request, workflow_dispatch] + +permissions: # needed to allow julia-actions/cache to delete old caches that it has created + actions: write + contents: read + +jobs: + test: # main CI tests + runs-on: ${{ matrix.os }} + strategy: + fail-fast: false + matrix: + version: ['lts', '1', 'pre'] + arch: [x64] + os: [ubuntu-latest] + + steps: + - uses: actions/checkout@v5 + - uses: julia-actions/setup-julia@v2 + with: + version: ${{ matrix.version }} + arch: ${{ matrix.arch }} + - uses: julia-actions/cache@v2 + - uses: julia-actions/julia-buildpkg@v1 + - uses: julia-actions/julia-runtest@v1 diff --git a/Project.toml b/Project.toml index 1e89c3d..9faf74f 100644 --- a/Project.toml +++ b/Project.toml @@ -22,8 +22,8 @@ PartitionedArrays = "5a9dfac6-5c52-46f7-8278-5e2210713be9" Plots = "91a5bcdd-55d7-5caf-9e0b-520d859cae80" Profile = "9abbd945-dff8-562f-b5e8-e1ebf5ef1b79" ProfileView = "c46f51b8-102a-5cf2-8d2c-8597cb0e0da7" -Revise = "295af30f-e4ad-537b-8983-00126c2a3abe" Roots = "f2b01f46-fcfa-551c-844a-d8ac1e96c665" StaticArrays = "90137ffa-7385-5640-81b9-e52037218182" +Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40" TimerOutputs = "a759f4b9-e2f1-59dc-863e-4aeb61b1ea8f" WriteVTK = "64499a7a-5c06-52f2-abe2-ccb03c286192" diff --git a/src/PhysicalModels/PhysicalModels.jl b/src/PhysicalModels/PhysicalModels.jl index 015e39c..8b10ea4 100644 --- a/src/PhysicalModels/PhysicalModels.jl +++ b/src/PhysicalModels/PhysicalModels.jl @@ -7,10 +7,6 @@ using DrWatson using ForwardDiff using LinearAlgebra using ..TensorAlgebra -using ..TensorAlgebra: _δδ_μ_3D -using ..TensorAlgebra: _δδ_λ_3D -using ..TensorAlgebra: _δδ_μ_2D -using ..TensorAlgebra: _δδ_λ_2D using ..TensorAlgebra: _∂H∂F_2D using ..TensorAlgebra: I3 using ..TensorAlgebra: I9 diff --git a/test/TestConstitutiveModels/PhysicalModels.jl b/test/TestConstitutiveModels/PhysicalModels.jl index ef89ef4..81bf2be 100644 --- a/test/TestConstitutiveModels/PhysicalModels.jl +++ b/test/TestConstitutiveModels/PhysicalModels.jl @@ -1,5 +1,6 @@ using Gridap using ForwardDiff +using JSON using StaticArrays using Test using HyperFEM.PhysicalModels @@ -430,7 +431,8 @@ end return n_layers, Weights, Biases, ϵ, β end - data_filename = "test/models/test_NN_TEM.json" + BASE_FOLDER = dirname(dirname(pathof(HyperFEM))) + data_filename = joinpath(BASE_FOLDER, "test/models/test_NN_TEM.json") n_layers, Weights, Biases, ϵ, β = ExtractingInfo(data_filename) model = ThermoElectroMech_PINNs(; W=Weights, b=Biases, ϵ=ϵ, β=β, nLayer=n_layers) diff --git a/test/runtests.jl b/test/runtests.jl index 8e0e807..82d8dbd 100644 --- a/test/runtests.jl +++ b/test/runtests.jl @@ -7,11 +7,6 @@ using Gridap.FESpaces using Gridap.CellData using Gridap.TensorValues using HyperFEM: jacobian, IterativeSolver, solve! -using WriteVTK -using Revise -using DrWatson -using JSON -using ForwardDiff using BenchmarkTools import Base.isapprox