diff --git a/.github/workflows/Tests.yml b/.github/workflows/Tests.yml index 0fd730c..c36b34f 100644 --- a/.github/workflows/Tests.yml +++ b/.github/workflows/Tests.yml @@ -14,19 +14,5 @@ concurrency: jobs: tests: - name: "Tests" - strategy: - fail-fast: false - matrix: - version: - - "1" - - "lts" - - "pre" - os: - - "ubuntu-latest" - - "windows-latest" - uses: "SciML/.github/.github/workflows/tests.yml@v1" - with: - julia-version: "${{ matrix.version }}" - os: "${{ matrix.os }}" + uses: "SciML/.github/.github/workflows/grouped-tests.yml@v1" secrets: "inherit" diff --git a/Project.toml b/Project.toml index cce8214..6587c16 100644 --- a/Project.toml +++ b/Project.toml @@ -17,15 +17,18 @@ SymbolicIndexingInterface = "2efcf032-c050-4f8e-a9bb-153293bab1f5" AllocCheck = "0.2" ArrayInterface = "7.25.0" BenchmarkTools = "1" +DAEProblemLibrary = "0.1" DiffEqBase = "7.5.5" ExplicitImports = "1.4.2" JLArrays = "0.3" +ModelingToolkit = "10, 11" NonlinearSolve = "4.19.1" PrecompileTools = "1.2.1" Reexport = "1.2.2" SciMLBase = "3.18.0" SciMLLogging = "1.10.1, 2" SymbolicIndexingInterface = "0.3.48" +Test = "1" julia = "1.10" [extras] @@ -36,7 +39,8 @@ ExplicitImports = "7d51a73a-1435-4ff3-83d9-f097790105c7" JLArrays = "27aeb0d3-9eb9-45fb-866b-73c2ecf80fcb" ModelingToolkit = "961ee093-0014-501f-94e3-6117800e7a78" NonlinearSolve = "8913a72c-1f9b-4ce2-8d82-65094dcecaec" +Pkg = "44cfe95a-1eb2-52ea-b672-e2afdf69b78f" Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40" [targets] -test = ["AllocCheck", "BenchmarkTools", "DAEProblemLibrary", "ExplicitImports", "JLArrays", "ModelingToolkit", "NonlinearSolve", "Test"] +test = ["AllocCheck", "BenchmarkTools", "DAEProblemLibrary", "ExplicitImports", "JLArrays", "ModelingToolkit", "NonlinearSolve", "Pkg", "Test"] diff --git a/test/qa/Project.toml b/test/qa/Project.toml new file mode 100644 index 0000000..08695ef --- /dev/null +++ b/test/qa/Project.toml @@ -0,0 +1,14 @@ +[deps] +AllocCheck = "9b6a8646-10ed-4001-bbdc-1d2f46dfbb1a" +DASSL = "e993076c-0cfd-5d6b-a1ac-36489fdf7917" +ExplicitImports = "7d51a73a-1435-4ff3-83d9-f097790105c7" +LinearAlgebra = "37e2e46d-f89d-539d-b4ee-838fcccc9c8e" +Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40" + +[sources] +DASSL = {path = "../.."} + +[compat] +AllocCheck = "0.2" +ExplicitImports = "1.4.2" +julia = "1.10" diff --git a/test/qa/qa.jl b/test/qa/qa.jl new file mode 100644 index 0000000..28d3676 --- /dev/null +++ b/test/qa/qa.jl @@ -0,0 +1,21 @@ +using DASSL +using Test + +@testset "QA" begin + @testset "Explicit Imports" begin + include(joinpath(@__DIR__, "..", "explicit_imports.jl")) + end + + @testset "Type Stability" begin + alg = dassl() + @test typeof(alg.maxorder) === Int + @test typeof(alg.factorize_jacobian) === Bool + + y0 = [1.0, 2.0] + cache = DASSL.alg_cache(alg, y0, nothing, 0.0, Val(true)) + @test isconcretetype(typeof(cache.jac_factorized)) + @test !(cache.jac_factorized isa Any && typeof(cache.jac_factorized) === Any) + end + + include(joinpath(@__DIR__, "..", "alloc_tests.jl")) +end diff --git a/test/runtests.jl b/test/runtests.jl index d98e336..abc51a1 100644 --- a/test/runtests.jl +++ b/test/runtests.jl @@ -1,11 +1,12 @@ -using DASSL, Test +using Test +using DASSL using LinearAlgebra: diagm, I -const GROUP = let g = get(ENV, "GROUP", "all") - isempty(g) ? "all" : g +const GROUP = let g = get(ENV, "GROUP", "All") + isempty(g) ? "All" : g end -if GROUP == "all" || GROUP == "core" +if GROUP == "All" || GROUP == "Core" @testset "Testing maxorder" begin F(t, y, dy) = (dy + y .^ 2) Fy(t, y, dy) = diagm(0 => 2y) @@ -75,23 +76,10 @@ if GROUP == "all" || GROUP == "core" end end -if GROUP == "all" || GROUP == "QA" - @testset "QA" begin - @testset "Explicit Imports" begin - include("explicit_imports.jl") - end - - @testset "Type Stability" begin - alg = dassl() - @test typeof(alg.maxorder) === Int - @test typeof(alg.factorize_jacobian) === Bool - - y0 = [1.0, 2.0] - cache = DASSL.alg_cache(alg, y0, nothing, 0.0, Val(true)) - @test isconcretetype(typeof(cache.jac_factorized)) - @test !(cache.jac_factorized isa Any && typeof(cache.jac_factorized) === Any) - end - - include("alloc_tests.jl") - end +if GROUP == "QA" + import Pkg + Pkg.activate(joinpath(@__DIR__, "qa")) + Pkg.develop(path = joinpath(@__DIR__, "..")) + Pkg.instantiate() + include(joinpath(@__DIR__, "qa", "qa.jl")) end diff --git a/test/test_groups.toml b/test/test_groups.toml new file mode 100644 index 0000000..bb5bb51 --- /dev/null +++ b/test/test_groups.toml @@ -0,0 +1,6 @@ +[Core] +versions = ["lts", "1", "pre"] +os = ["ubuntu-latest", "windows-latest"] + +[QA] +versions = ["lts", "1"]