From fdce0af7585f4b5dc736e6cd6059d2124c2b26ab Mon Sep 17 00:00:00 2001 From: ChrisRackauckas-Claude Date: Tue, 9 Jun 2026 17:59:29 -0400 Subject: [PATCH] Canonical CI: grouped-tests.yml + root test/test_groups.toml Convert the root CI workflow to the canonical thin caller of SciML/.github/.github/workflows/grouped-tests.yml@v1, with the group x version matrix declared in test/test_groups.toml. - CI.yml: replace the hand-maintained group/version/exclude matrix with a single `tests` job calling grouped-tests.yml@v1 (secrets: inherit). All inputs keep their defaults (GROUP env, check-bounds yes, coverage src,ext), so no `with:` block is needed. on:/name: preserved verbatim. Linux-only, no os axis. - test/test_groups.toml (root): [Core] lts/1/pre, [AD] lts, [QA] lts/1 -- reproducing the old matrix's functional coverage. - QA isolation (category B): Aqua + ExplicitImports + JET, previously inline in Core (Aqua/EI) and in the nopre group (JET), now live in a GROUP==QA branch backed by an isolated env at test/qa/Project.toml ([sources] Integrals = ../..; julia 1.10 floor) and test/qa/qa.jl. This keeps QA tooling deps out of the main test target's resolve. - Project.toml: drop Aqua/ExplicitImports from [compat], [extras] and [targets].test (they moved to the isolated QA env). julia compat already at the 1.10 LTS floor; every remaining extra has a [compat]. Co-Authored-By: Chris Rackauckas Co-Authored-By: Claude Opus 4.8 (1M context) --- .github/workflows/CI.yml | 27 ++----------------------- Project.toml | 6 +----- test/explicit_imports_tests.jl | 16 --------------- test/nopre/Project.toml | 7 ------- test/qa.jl | 15 -------------- test/qa/Project.toml | 17 ++++++++++++++++ test/{nopre/jet_tests.jl => qa/qa.jl} | 29 +++++++++++++++++++++++++++ test/runtests.jl | 20 ++++++++++-------- test/test_groups.toml | 16 +++++++++++++++ 9 files changed, 77 insertions(+), 76 deletions(-) delete mode 100644 test/explicit_imports_tests.jl delete mode 100644 test/nopre/Project.toml delete mode 100644 test/qa.jl create mode 100644 test/qa/Project.toml rename test/{nopre/jet_tests.jl => qa/qa.jl} (67%) create mode 100644 test/test_groups.toml diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml index 5219375e..fde1b199 100644 --- a/.github/workflows/CI.yml +++ b/.github/workflows/CI.yml @@ -11,29 +11,6 @@ on: paths-ignore: - 'docs/**' jobs: - test: - strategy: - fail-fast: false - matrix: - group: - - Core - - AD - - nopre - version: - - '1' - - 'lts' - - 'pre' - exclude: - # AD tests crash with SIGSEGV on Julia 1.12+ (Zygote/Mooncake issue) - - group: AD - version: '1' - - group: AD - version: 'pre' - # nopre tests (JET) should not run on pre-release or LTS Julia versions - - group: nopre - version: 'pre' - uses: "SciML/.github/.github/workflows/tests.yml@v1" - with: - julia-version: "${{ matrix.version }}" - group: "${{ matrix.group }}" + tests: + uses: "SciML/.github/.github/workflows/grouped-tests.yml@v1" secrets: "inherit" diff --git a/Project.toml b/Project.toml index b90bd703..dd93ab32 100644 --- a/Project.toml +++ b/Project.toml @@ -45,7 +45,6 @@ IntegralsZygoteExt = ["Zygote", "ChainRulesCore"] [compat] ADTypes = "1.22.0" -Aqua = "0.8" Arblib = "1" ArrayInterface = "7.9.0" ChainRulesCore = "1.18" @@ -54,7 +53,6 @@ Cuba = "2.2" Cubature = "1.5" DifferentiationInterface = "0.7" Distributions = "0.25.87" -ExplicitImports = "1.14.0" FastGaussQuadrature = "0.5,1" FastTanhSinhQuadrature = "2.1" FiniteDiff = "2.12" @@ -79,14 +77,12 @@ julia = "1.10" [extras] ADTypes = "47edcb42-4c32-4615-8424-f2b9edc5f35b" -Aqua = "4c88cf16-eb10-579e-8560-4a9242c79595" Arblib = "fb37089c-8514-4489-9461-98f9c8763369" ChainRulesCore = "d360d2e6-b24c-11e9-a2a3-2a2ae2dbcce4" Cuba = "8a292aeb-7a57-582c-b821-06e4c11590b1" Cubature = "667455a9-e2ce-5579-9412-b964f529a492" DifferentiationInterface = "a0c0ee7d-e4b9-4e03-894e-1c5f64a51d63" Distributions = "31c24e10-a181-5473-b8eb-7969acd0382f" -ExplicitImports = "7d51a73a-1435-4ff3-83d9-f097790105c7" FastGaussQuadrature = "442a2c76-b920-505d-bb47-c5924d526838" FastTanhSinhQuadrature = "b650e0df-f744-4436-b963-b44034668c57" FiniteDiff = "6a86dc24-6348-571c-b903-95158fe2bd41" @@ -101,4 +97,4 @@ Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40" Zygote = "e88e6eb3-aa80-5325-afca-941959d7151f" [targets] -test = ["ADTypes", "Aqua", "Arblib", "StaticArrays", "FiniteDiff", "SafeTestsets", "Test", "Distributions", "ForwardDiff", "Zygote", "ChainRulesCore", "FastGaussQuadrature", "FastTanhSinhQuadrature", "Cuba", "Cubature", "MCIntegration", "Mooncake", "ExplicitImports", "DifferentiationInterface", "Pkg", "HAdaptiveIntegration"] +test = ["ADTypes", "Arblib", "StaticArrays", "FiniteDiff", "SafeTestsets", "Test", "Distributions", "ForwardDiff", "Zygote", "ChainRulesCore", "FastGaussQuadrature", "FastTanhSinhQuadrature", "Cuba", "Cubature", "MCIntegration", "Mooncake", "DifferentiationInterface", "Pkg", "HAdaptiveIntegration"] diff --git a/test/explicit_imports_tests.jl b/test/explicit_imports_tests.jl deleted file mode 100644 index 24c6d649..00000000 --- a/test/explicit_imports_tests.jl +++ /dev/null @@ -1,16 +0,0 @@ -using ExplicitImports -using Integrals -using Test -using LinearAlgebra: norm - -@testset "ExplicitImports" begin - @test check_no_implicit_imports(Integrals) === nothing - # Note: norm is used in default parameters in included files (algorithms.jl) - # which ExplicitImports may not detect properly, so we ignore it - @test check_no_stale_explicit_imports( - Integrals; ignore = ( - :norm, :AbstractVerbositySpecifier, :MessageLevel, - :DebugLevel, :Detailed, :ErrorLevel, :Minimal, :None, :Standard, :All, - ) - ) === nothing -end diff --git a/test/nopre/Project.toml b/test/nopre/Project.toml deleted file mode 100644 index 29559b55..00000000 --- a/test/nopre/Project.toml +++ /dev/null @@ -1,7 +0,0 @@ -[deps] -Integrals = "de52edbc-65ea-441a-8357-d3a637375a31" -JET = "c3a54625-cd67-489e-a8e7-0a5a0ff4e31b" -Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40" - -[compat] -JET = "0.9, 0.10, 0.11.3" diff --git a/test/qa.jl b/test/qa.jl deleted file mode 100644 index a6b0379e..00000000 --- a/test/qa.jl +++ /dev/null @@ -1,15 +0,0 @@ -using Integrals, Aqua -using Test -@testset "Aqua" begin - Aqua.find_persistent_tasks_deps(Integrals) - Aqua.test_ambiguities(Integrals, recursive = false) - Aqua.test_deps_compat(Integrals) - Aqua.test_piracies( - Integrals, - treat_as_own = [IntegralProblem, SampledIntegralProblem] - ) - Aqua.test_project_extras(Integrals) - Aqua.test_stale_deps(Integrals) - Aqua.test_unbound_args(Integrals) - Aqua.test_undefined_exports(Integrals) -end diff --git a/test/qa/Project.toml b/test/qa/Project.toml new file mode 100644 index 00000000..581e61cf --- /dev/null +++ b/test/qa/Project.toml @@ -0,0 +1,17 @@ +[deps] +Aqua = "4c88cf16-eb10-579e-8560-4a9242c79595" +ExplicitImports = "7d51a73a-1435-4ff3-83d9-f097790105c7" +Integrals = "de52edbc-65ea-441a-8357-d3a637375a31" +JET = "c3a54625-cd67-489e-a8e7-0a5a0ff4e31b" +Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40" + +[sources] +Integrals = {path = "../.."} + +[compat] +Aqua = "0.8" +ExplicitImports = "1.14.0" +JET = "0.9, 0.10, 0.11.3" +Integrals = "5" +Test = "1.10" +julia = "1.10" diff --git a/test/nopre/jet_tests.jl b/test/qa/qa.jl similarity index 67% rename from test/nopre/jet_tests.jl rename to test/qa/qa.jl index 6ca6381d..24badda3 100644 --- a/test/nopre/jet_tests.jl +++ b/test/qa/qa.jl @@ -1,6 +1,35 @@ using Integrals +using Aqua +using ExplicitImports using JET using Test +using LinearAlgebra: norm + +@testset "Aqua" begin + Aqua.find_persistent_tasks_deps(Integrals) + Aqua.test_ambiguities(Integrals, recursive = false) + Aqua.test_deps_compat(Integrals) + Aqua.test_piracies( + Integrals, + treat_as_own = [IntegralProblem, SampledIntegralProblem] + ) + Aqua.test_project_extras(Integrals) + Aqua.test_stale_deps(Integrals) + Aqua.test_unbound_args(Integrals) + Aqua.test_undefined_exports(Integrals) +end + +@testset "ExplicitImports" begin + @test check_no_implicit_imports(Integrals) === nothing + # Note: norm is used in default parameters in included files (algorithms.jl) + # which ExplicitImports may not detect properly, so we ignore it + @test check_no_stale_explicit_imports( + Integrals; ignore = ( + :norm, :AbstractVerbositySpecifier, :MessageLevel, + :DebugLevel, :Detailed, :ErrorLevel, :Minimal, :None, :Standard, :All, + ) + ) === nothing +end @testset "JET static analysis" begin @testset "QuadGKJL" begin diff --git a/test/runtests.jl b/test/runtests.jl index 59560db4..499c7739 100644 --- a/test/runtests.jl +++ b/test/runtests.jl @@ -4,15 +4,19 @@ using Test const GROUP = get(ENV, "GROUP", "All") -function activate_nopre_env() - Pkg.activate("nopre") - Pkg.develop(PackageSpec(path = dirname(@__DIR__))) +# QA (Aqua + ExplicitImports + JET) runs in an isolated environment (test/qa) so +# its tooling deps never enter the main test target's resolve. On Julia < 1.11 +# the [sources] table is ignored, so develop the package by path to test the PR +# branch code. +function activate_qa_env() + Pkg.activate(joinpath(@__DIR__, "qa")) + if VERSION < v"1.11.0-DEV.0" + Pkg.develop(PackageSpec(path = dirname(@__DIR__))) + end return Pkg.instantiate() end if GROUP == "All" || GROUP == "Core" - @time @safetestset "Explicit Imports" include("explicit_imports_tests.jl") - @time @safetestset "Quality Assurance" include("qa.jl") @time @safetestset "Interface Tests" include("interface_tests.jl") @time @safetestset "Infinite Integral Tests" include("inf_integral_tests.jl") @time @safetestset "Gaussian Quadrature Tests" include("gaussian_quadrature_tests.jl") @@ -28,7 +32,7 @@ if GROUP == "All" || GROUP == "AD" @time @safetestset "Nested AD Tests" include("nested_ad_tests.jl") end -if GROUP == "nopre" - activate_nopre_env() - @time @safetestset "JET Static Analysis" include("nopre/jet_tests.jl") +if GROUP == "QA" + activate_qa_env() + @time @safetestset "Quality Assurance" include("qa/qa.jl") end diff --git a/test/test_groups.toml b/test/test_groups.toml new file mode 100644 index 00000000..42181b83 --- /dev/null +++ b/test/test_groups.toml @@ -0,0 +1,16 @@ +# Root Integrals.jl test-group matrix, consumed by the reusable +# grouped-tests.yml@v1 caller (.github/workflows/CI.yml). Each group runs on +# every Julia version it lists; runtests.jl dispatches on GROUP. + +[Core] +versions = ["lts", "1", "pre"] + +# AD tests crash with SIGSEGV on Julia 1.12+ (Zygote/Mooncake issue), so only +# the LTS channel is exercised. +[AD] +versions = ["lts"] + +# Aqua + ExplicitImports + JET, isolated in test/qa/Project.toml. JET is not +# compatible with the prerelease channel. +[QA] +versions = ["lts", "1"]