From a62caef37942c7fef9042999764cd2f8080a03e1 Mon Sep 17 00:00:00 2001 From: ChrisRackauckas-Claude Date: Tue, 9 Jun 2026 18:15:20 -0400 Subject: [PATCH 1/3] Canonical CI: grouped-tests.yml + root test/test_groups.toml Convert the root Tests.yml to the canonical thin caller of SciML/.github/.github/workflows/grouped-tests.yml@v1, with the group x version matrix declared once in test/test_groups.toml. - Tests.yml: replace the version matrix job (tests.yml@v1, version "1") with the grouped-tests.yml@v1 thin caller; preserve on:+concurrency: and name: verbatim. coverage-directories: "src" (no ext/ dir). - test/test_groups.toml: Core on [lts,1,pre], QA on [lts,1] (Linux-only). - test/runtests.jl: add GROUP dispatch (existing suite under Core/All; new QA group activates test/qa and runs Aqua + JET). - test/qa/{Project.toml,qa.jl}: new QA environment running Aqua.test_all and JET.test_package(target_defined_modules=true). - Project.toml: add [compat] entries for all [extras] deps (DifferentialEquations, SafeTestsets, Test); julia floor already 1.10. Co-Authored-By: Chris Rackauckas Co-Authored-By: Claude Opus 4.8 (1M context) --- .github/workflows/Tests.yml | 10 ++-------- Project.toml | 3 +++ test/qa/Project.toml | 14 ++++++++++++++ test/qa/qa.jl | 12 ++++++++++++ test/runtests.jl | 23 +++++++++++++++++------ test/test_groups.toml | 5 +++++ 6 files changed, 53 insertions(+), 14 deletions(-) create mode 100644 test/qa/Project.toml create mode 100644 test/qa/qa.jl create mode 100644 test/test_groups.toml diff --git a/.github/workflows/Tests.yml b/.github/workflows/Tests.yml index d41f8f2..f38cc00 100644 --- a/.github/workflows/Tests.yml +++ b/.github/workflows/Tests.yml @@ -20,13 +20,7 @@ concurrency: jobs: tests: - name: "Tests" - strategy: - fail-fast: false - matrix: - version: - - "1" - uses: "SciML/.github/.github/workflows/tests.yml@v1" + uses: "SciML/.github/.github/workflows/grouped-tests.yml@v1" with: - julia-version: "${{ matrix.version }}" + coverage-directories: "src" secrets: "inherit" diff --git a/Project.toml b/Project.toml index fdb98f9..22b87fc 100644 --- a/Project.toml +++ b/Project.toml @@ -7,7 +7,10 @@ version = "1.0.0" ModelingToolkit = "961ee093-0014-501f-94e3-6117800e7a78" [compat] +DifferentialEquations = "7" ModelingToolkit = "9" +SafeTestsets = "0.1" +Test = "1" julia = "1.10" [extras] diff --git a/test/qa/Project.toml b/test/qa/Project.toml new file mode 100644 index 0000000..687e23a --- /dev/null +++ b/test/qa/Project.toml @@ -0,0 +1,14 @@ +[deps] +Aqua = "4c88cf16-eb10-579e-8560-4a9242c79595" +JET = "c3a54625-cd67-489e-a8e7-0a5a0ff4e31b" +ProcessSimulator = "8886c03b-4dde-4be1-b6ee-87d056f985b8" +Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40" + +[sources] +ProcessSimulator = {path = "../.."} + +[compat] +Aqua = "0.8" +JET = "0.9,0.10,0.11" +Test = "1" +julia = "1.10" diff --git a/test/qa/qa.jl b/test/qa/qa.jl new file mode 100644 index 0000000..692ada3 --- /dev/null +++ b/test/qa/qa.jl @@ -0,0 +1,12 @@ +using ProcessSimulator +using Aqua +using JET +using Test + +@testset "Aqua" begin + Aqua.test_all(ProcessSimulator) +end + +@testset "JET" begin + JET.test_package(ProcessSimulator; target_defined_modules = true) +end diff --git a/test/runtests.jl b/test/runtests.jl index 437fc5a..d9ceb4a 100644 --- a/test/runtests.jl +++ b/test/runtests.jl @@ -1,11 +1,22 @@ -using ProcessSimulator -using Test +using Pkg using SafeTestsets +using Test -@safetestset "Base components" begin - include("base/simple_steady_state.jl") +const GROUP = get(ENV, "GROUP", "All") + +if GROUP == "QA" + Pkg.activate("qa") + Pkg.develop(PackageSpec(path = dirname(@__DIR__))) + Pkg.instantiate() + include("qa/qa.jl") end -@safetestset "Reactors" begin - include("reactors/simple_cstr.jl") +if GROUP == "All" || GROUP == "Core" + @safetestset "Base components" begin + include("base/simple_steady_state.jl") + end + + @safetestset "Reactors" begin + include("reactors/simple_cstr.jl") + end end diff --git a/test/test_groups.toml b/test/test_groups.toml new file mode 100644 index 0000000..1fe84cd --- /dev/null +++ b/test/test_groups.toml @@ -0,0 +1,5 @@ +[Core] +versions = ["lts", "1", "pre"] + +[QA] +versions = ["lts", "1"] From 1d81981abcc436963e897c52e5b8c6ae1a1696e9 Mon Sep 17 00:00:00 2001 From: ChrisRackauckas-Claude Date: Tue, 9 Jun 2026 18:26:20 -0400 Subject: [PATCH 2/3] Add Pkg to root test deps for Core group test/runtests.jl does `using Pkg` for the QA group's Pkg.activate, but Pkg was not a declared test dependency, so the Core group (run with project='.') failed with `ArgumentError: Package Pkg not found in current path`. Declare Pkg in [extras] and [targets].test. Co-Authored-By: Chris Rackauckas Co-Authored-By: Claude Opus 4.8 (1M context) --- Project.toml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Project.toml b/Project.toml index 22b87fc..4d76ee5 100644 --- a/Project.toml +++ b/Project.toml @@ -17,6 +17,7 @@ julia = "1.10" SafeTestsets = "1bc83da4-3b8d-516f-aca4-4fe02f6d838f" Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40" DifferentialEquations = "0c46a032-eb83-5123-abaf-570d42b7fbaa" +Pkg = "44cfe95a-1eb2-52ea-b672-e2afdf69b78f" [targets] -test = ["Test", "SafeTestsets", "DifferentialEquations"] +test = ["Test", "SafeTestsets", "DifferentialEquations", "Pkg"] From 618c8bc2505d73c9a77aaf1729a08aaea4616165 Mon Sep 17 00:00:00 2001 From: ChrisRackauckas-Claude Date: Sun, 14 Jun 2026 19:53:45 -0400 Subject: [PATCH 3/3] Adopt SciMLTesting v1.2 folder-based run_tests (on top of grouped-tests conversion) Co-Authored-By: Chris Rackauckas Co-Authored-By: Claude Opus 4.8 (1M context) --- Project.toml | 5 +++-- test/qa/Project.toml | 4 ++++ test/qa/qa.jl | 15 ++++----------- test/runtests.jl | 24 ++---------------------- test/{reactors => }/simple_cstr.jl | 0 test/{base => }/simple_steady_state.jl | 0 6 files changed, 13 insertions(+), 35 deletions(-) rename test/{reactors => }/simple_cstr.jl (100%) rename test/{base => }/simple_steady_state.jl (100%) diff --git a/Project.toml b/Project.toml index 4d76ee5..068f222 100644 --- a/Project.toml +++ b/Project.toml @@ -10,6 +10,7 @@ ModelingToolkit = "961ee093-0014-501f-94e3-6117800e7a78" DifferentialEquations = "7" ModelingToolkit = "9" SafeTestsets = "0.1" +SciMLTesting = "1" Test = "1" julia = "1.10" @@ -17,7 +18,7 @@ julia = "1.10" SafeTestsets = "1bc83da4-3b8d-516f-aca4-4fe02f6d838f" Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40" DifferentialEquations = "0c46a032-eb83-5123-abaf-570d42b7fbaa" -Pkg = "44cfe95a-1eb2-52ea-b672-e2afdf69b78f" +SciMLTesting = "09d9d899-5365-40a9-917a-5f67fddea283" [targets] -test = ["Test", "SafeTestsets", "DifferentialEquations", "Pkg"] +test = ["Test", "SafeTestsets", "DifferentialEquations", "SciMLTesting"] diff --git a/test/qa/Project.toml b/test/qa/Project.toml index 687e23a..d766d87 100644 --- a/test/qa/Project.toml +++ b/test/qa/Project.toml @@ -2,6 +2,8 @@ Aqua = "4c88cf16-eb10-579e-8560-4a9242c79595" JET = "c3a54625-cd67-489e-a8e7-0a5a0ff4e31b" ProcessSimulator = "8886c03b-4dde-4be1-b6ee-87d056f985b8" +SafeTestsets = "1bc83da4-3b8d-516f-aca4-4fe02f6d838f" +SciMLTesting = "09d9d899-5365-40a9-917a-5f67fddea283" Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40" [sources] @@ -10,5 +12,7 @@ ProcessSimulator = {path = "../.."} [compat] Aqua = "0.8" JET = "0.9,0.10,0.11" +SafeTestsets = "0.1, 1" +SciMLTesting = "1" Test = "1" julia = "1.10" diff --git a/test/qa/qa.jl b/test/qa/qa.jl index 692ada3..1c69ace 100644 --- a/test/qa/qa.jl +++ b/test/qa/qa.jl @@ -1,12 +1,5 @@ -using ProcessSimulator -using Aqua -using JET -using Test +using ProcessSimulator, Aqua, JET +using SciMLTesting -@testset "Aqua" begin - Aqua.test_all(ProcessSimulator) -end - -@testset "JET" begin - JET.test_package(ProcessSimulator; target_defined_modules = true) -end +run_qa(ProcessSimulator; Aqua = Aqua, JET = JET, jet = true, + jet_kwargs = (; target_defined_modules = true)) diff --git a/test/runtests.jl b/test/runtests.jl index d9ceb4a..a18a7cc 100644 --- a/test/runtests.jl +++ b/test/runtests.jl @@ -1,22 +1,2 @@ -using Pkg -using SafeTestsets -using Test - -const GROUP = get(ENV, "GROUP", "All") - -if GROUP == "QA" - Pkg.activate("qa") - Pkg.develop(PackageSpec(path = dirname(@__DIR__))) - Pkg.instantiate() - include("qa/qa.jl") -end - -if GROUP == "All" || GROUP == "Core" - @safetestset "Base components" begin - include("base/simple_steady_state.jl") - end - - @safetestset "Reactors" begin - include("reactors/simple_cstr.jl") - end -end +using SciMLTesting +run_tests() diff --git a/test/reactors/simple_cstr.jl b/test/simple_cstr.jl similarity index 100% rename from test/reactors/simple_cstr.jl rename to test/simple_cstr.jl diff --git a/test/base/simple_steady_state.jl b/test/simple_steady_state.jl similarity index 100% rename from test/base/simple_steady_state.jl rename to test/simple_steady_state.jl