From a8ed2fa156da336d8660ac335df77337b9659eab Mon Sep 17 00:00:00 2001 From: Chris Rackauckas Date: Tue, 9 Jun 2026 17:58:16 -0400 Subject: [PATCH 1/2] Canonical CI: grouped-tests.yml + root test/test_groups.toml Convert the root test workflow (Tests.yml) to the canonical SciML/.github grouped-tests.yml@v1 thin caller, with the group x version matrix declared once in test/test_groups.toml. Category B refactor: the inline JET/ExplicitImports/AllocCheck checks (previously bundled in the lowercase "nopre" group) are moved into a GROUP=="QA" group, isolated in test/qa/Project.toml (Aqua-free env via a [sources] path to the package root) with a qa.jl aggregator. Functional tests run under GROUP=="Core" (and "All"). runtests.jl dispatches on the canonical uppercase GROUP values; for QA it activates test/qa, develops the package, instantiates, then includes qa.jl. Matrix mapping (group renamed, per-group version coverage identical): core -> Core on [lts, 1, pre] nopre -> QA on [lts, 1] Benign Project.toml metadata fixes: julia compat already at the 1.10 LTS floor; added [compat] entries for the [extras] deps Pkg, Statistics, Test. test/nopre -> test/qa rename also updated in .github/dependabot.yml. Co-Authored-By: Chris Rackauckas Co-Authored-By: Claude Opus 4.8 (1M context) --- .github/dependabot.yml | 2 +- .github/workflows/Tests.yml | 19 +------------- Project.toml | 3 +++ test/{nopre => qa}/Project.toml | 5 +++- test/{nopre => qa}/alloc_tests.jl | 0 test/{nopre => qa}/explicit_imports.jl | 0 test/{nopre => qa}/jet_tests.jl | 0 test/qa/qa.jl | 9 +++++++ test/runtests.jl | 35 ++++++++------------------ test/test_groups.toml | 5 ++++ 10 files changed, 34 insertions(+), 44 deletions(-) rename test/{nopre => qa}/Project.toml (85%) rename test/{nopre => qa}/alloc_tests.jl (100%) rename test/{nopre => qa}/explicit_imports.jl (100%) rename test/{nopre => qa}/jet_tests.jl (100%) create mode 100644 test/qa/qa.jl create mode 100644 test/test_groups.toml diff --git a/.github/dependabot.yml b/.github/dependabot.yml index 6e23b51..a373873 100644 --- a/.github/dependabot.yml +++ b/.github/dependabot.yml @@ -10,7 +10,7 @@ updates: - "/" - "/docs" - "/test" - - "/test/nopre" + - "/test/qa" schedule: interval: "daily" groups: diff --git a/.github/workflows/Tests.yml b/.github/workflows/Tests.yml index 3c67102..c36b34f 100644 --- a/.github/workflows/Tests.yml +++ b/.github/workflows/Tests.yml @@ -14,22 +14,5 @@ concurrency: jobs: tests: - name: "Tests" - strategy: - fail-fast: false - matrix: - version: - - "1" - - "lts" - - "pre" - group: - - "core" - - "nopre" - exclude: - - group: "nopre" - version: "pre" - uses: "SciML/.github/.github/workflows/tests.yml@v1" - with: - julia-version: "${{ matrix.version }}" - group: "${{ matrix.group }}" + uses: "SciML/.github/.github/workflows/grouped-tests.yml@v1" secrets: "inherit" diff --git a/Project.toml b/Project.toml index bd88a62..2af5536 100644 --- a/Project.toml +++ b/Project.toml @@ -14,8 +14,11 @@ RandomNumbers = "e6cf234a-135c-5ec9-84dd-332b85af5143" DiffEqBase = "6.133.1, 7" DiffEqNoiseProcess = "5.13.0" Distributions = "0.25.100" +Pkg = "1" RandomNumbers = "1.5.3" +Statistics = "1" StochasticDiffEq = "6.65.0, 7" +Test = "1" julia = "1.10" [extras] diff --git a/test/nopre/Project.toml b/test/qa/Project.toml similarity index 85% rename from test/nopre/Project.toml rename to test/qa/Project.toml index fd5bf15..07e2526 100644 --- a/test/nopre/Project.toml +++ b/test/qa/Project.toml @@ -5,9 +5,12 @@ ExplicitImports = "7d51a73a-1435-4ff3-83d9-f097790105c7" JET = "c3a54625-cd67-489e-a8e7-0a5a0ff4e31b" Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40" +[sources] +DiffEqFinancial = {path = "../.."} + [compat] AllocCheck = "0.2" -DiffEqFinancial = "2" ExplicitImports = "1.14" JET = "0.9, 0.10, 0.11" Test = "1.10" +julia = "1.10" diff --git a/test/nopre/alloc_tests.jl b/test/qa/alloc_tests.jl similarity index 100% rename from test/nopre/alloc_tests.jl rename to test/qa/alloc_tests.jl diff --git a/test/nopre/explicit_imports.jl b/test/qa/explicit_imports.jl similarity index 100% rename from test/nopre/explicit_imports.jl rename to test/qa/explicit_imports.jl diff --git a/test/nopre/jet_tests.jl b/test/qa/jet_tests.jl similarity index 100% rename from test/nopre/jet_tests.jl rename to test/qa/jet_tests.jl diff --git a/test/qa/qa.jl b/test/qa/qa.jl new file mode 100644 index 0000000..190cbe9 --- /dev/null +++ b/test/qa/qa.jl @@ -0,0 +1,9 @@ +@testset "Explicit Imports" begin + include("explicit_imports.jl") +end +@testset "JET Tests" begin + include("jet_tests.jl") +end +@testset "AllocCheck - Zero Allocations" begin + include("alloc_tests.jl") +end diff --git a/test/runtests.jl b/test/runtests.jl index 017135c..2335dfc 100644 --- a/test/runtests.jl +++ b/test/runtests.jl @@ -1,21 +1,12 @@ using Pkg -using DiffEqFinancial, Statistics, StochasticDiffEq using Test -const GROUP = get(ENV, "GROUP", "all") +const GROUP = get(ENV, "GROUP", "All") -function activate_nopre_env() - Pkg.activate("nopre") - Pkg.develop(PackageSpec(path = dirname(@__DIR__))) - return Pkg.instantiate() -end +if GROUP == "All" || GROUP == "Core" + using DiffEqFinancial, Statistics, StochasticDiffEq -@testset "Interface Compatibility" begin - include("interface_tests.jl") -end - -@testset "DiffEqFinancial.jl" begin - if GROUP == "all" || GROUP == "core" + @testset "DiffEqFinancial.jl" begin @testset "Core Tests" begin u0 = [1.0; 0.5] σ = 0.25 @@ -221,17 +212,13 @@ end end end end +end - if GROUP == "all" || GROUP == "nopre" - activate_nopre_env() - @testset "Explicit Imports" begin - include("nopre/explicit_imports.jl") - end - @testset "JET Tests" begin - include("nopre/jet_tests.jl") - end - @testset "AllocCheck - Zero Allocations" begin - include("nopre/alloc_tests.jl") - end +if GROUP == "All" || GROUP == "QA" + Pkg.activate(joinpath(@__DIR__, "qa")) + Pkg.develop(PackageSpec(path = dirname(@__DIR__))) + Pkg.instantiate() + @testset "Quality Assurance" begin + include(joinpath(@__DIR__, "qa", "qa.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 59eb294836d313e6b3d675c865b5a0a99c722757 Mon Sep 17 00:00:00 2001 From: "Chris Rackauckas (Claude)" Date: Tue, 9 Jun 2026 20:31:34 -0400 Subject: [PATCH 2/2] Hoist Core-group usings to top level in test/runtests.jl The using DiffEqFinancial, Statistics, StochasticDiffEq line sat inside the top-level if GROUP == ... block that also uses @testset/@test inline. Julia macro-expands the entire if block as one unit before the in-block using runs, so the macros were undefined (UndefVarError: @testset not defined in Main). Move the functional usings to top level, above const GROUP. Co-Authored-By: Chris Rackauckas Co-Authored-By: Claude Opus 4.8 (1M context) --- test/runtests.jl | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/test/runtests.jl b/test/runtests.jl index 2335dfc..f09a859 100644 --- a/test/runtests.jl +++ b/test/runtests.jl @@ -1,11 +1,10 @@ using Pkg using Test +using DiffEqFinancial, Statistics, StochasticDiffEq const GROUP = get(ENV, "GROUP", "All") if GROUP == "All" || GROUP == "Core" - using DiffEqFinancial, Statistics, StochasticDiffEq - @testset "DiffEqFinancial.jl" begin @testset "Core Tests" begin u0 = [1.0; 0.5]