Skip to content

Commit 0cca4d0

Browse files
ChrisRackauckas-ClaudeChrisRackauckasclaudeChrisRackauckas-Claude
authored
Canonical CI: grouped-tests.yml + root test/test_groups.toml (#217)
* Canonical CI: grouped-tests.yml + root test/test_groups.toml Convert the root test workflow (Tests.yml, name: CI) to the canonical SciML/.github grouped-tests.yml@v1 thin caller, with the group x version matrix declared once in test/test_groups.toml at the repo root. - .github/workflows/Tests.yml: replace the hand-maintained group({CPU,QA}) x version({lts,1}) matrix job (which called the legacy per-job tests.yml@v1) with a thin caller to grouped-tests.yml@v1. on: and concurrency: preserved verbatim; filename + name: kept. - test/test_groups.toml (new, root): [Core] and [QA], each on [lts, 1]. Reproduces the old matrix with the functional CPU group renamed to the canonical Core (QA unchanged). Linux-only, no os axis. - test/qa/Project.toml (new): isolated QA env (Aqua, ExplicitImports, Documenter + the doctest/ExplicitImports support deps) with DeepEquilibriumNetworks via [sources] path = "../.." and julia = "1.10". - test/qa/qa.jl: the QA checks, moved verbatim from test/qa_tests.jl (no checks added, removed, or excluded). - test/runtests.jl: GROUP == "QA" now activates test/qa, develops the package, instantiates, then includes qa/qa.jl. Functional tests run under GROUP Core (CPU and ALL still accepted for back-compat). - test/shared_testsetup.jl: treat BACKEND_GROUP "core" as CPU so the renamed Core group selects the CPU device. Project.toml already satisfies the benign-metadata checks: [compat] julia = "1.10" (LTS floor) and every [extras] dep has a [compat] entry. Co-Authored-By: Chris Rackauckas <accounts@chrisrackauckas.com> Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> * Fold GPU.yml CUDA tests into the [GPU] test group The bespoke .github/workflows/GPU.yml ran the functional suite on the self-hosted CUDA runner with BACKEND_GROUP=CUDA. That is now a [GPU] group in test/test_groups.toml (versions ["1"], runner [self-hosted, Linux, X64, gpu], timeout 240) executed by the grouped-tests.yml@v1 caller, with runtests.jl setting BACKEND_GROUP=CUDA for GROUP=GPU. The workflow's gpu-docs job was a duplicate of the centralized documentation.yml already on main, so GPU.yml is deleted outright. Co-Authored-By: Chris Rackauckas <accounts@chrisrackauckas.com> Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> * Adopt SciMLTesting v1.2 folder-based run_tests (on top of grouped-tests conversion) DEQ's GROUP semantics are backend/capability-based, not folder-partitioned: the GPU group runs the *same* Core test files (utils_tests.jl + layers_tests.jl) with shared_testsetup.jl's backend switched to CUDA via BACKEND_GROUP, so it cannot be expressed as a separate folder of files. Use explicit-args run_tests (v1.2): core = the two top-level Core files (each in its own @safetestset), GPU group = same body with BACKEND_GROUP=CUDA, QA = test/qa sub-env. Curated all=["Core"] so the self-hosted GPU lane and QA stay out of the aggregate. Drop Pkg from the test deps (only the old harness used it; SciMLTesting handles activate/develop now) and add SciMLTesting + SafeTestsets to the QA sub-env. test_groups.toml unchanged. Co-Authored-By: Chris Rackauckas <accounts@chrisrackauckas.com> Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> --------- Co-authored-by: ChrisRackauckas-Claude <accounts@chrisrackauckas.com> Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com> Co-authored-by: ChrisRackauckas-Claude <claude@chrisrackauckas.com>
1 parent 1d71fca commit 0cca4d0

8 files changed

Lines changed: 69 additions & 98 deletions

File tree

.github/workflows/GPU.yml

Lines changed: 0 additions & 65 deletions
This file was deleted.

.github/workflows/Tests.yml

Lines changed: 1 addition & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -17,18 +17,5 @@ concurrency:
1717

1818
jobs:
1919
tests:
20-
name: "Tests"
21-
strategy:
22-
fail-fast: false
23-
matrix:
24-
group:
25-
- CPU
26-
- QA
27-
version:
28-
- 'lts'
29-
- '1'
30-
uses: "SciML/.github/.github/workflows/tests.yml@v1"
31-
with:
32-
julia-version: "${{ matrix.version }}"
33-
group: "${{ matrix.group }}"
20+
uses: "SciML/.github/.github/workflows/grouped-tests.yml@v1"
3421
secrets: "inherit"

Project.toml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -46,11 +46,11 @@ NonlinearSolve = "4"
4646
NonlinearSolveBase = "1.5, 2"
4747
OrdinaryDiffEq = "6.74, 7"
4848
OrdinaryDiffEqAdamsBashforthMoulton = "1, 2"
49-
Pkg = "1.10"
5049
PrecompileTools = "1.2.1"
5150
Random = "1.10"
5251
SciMLBase = "2, 3.3"
5352
SciMLSensitivity = "7.43"
53+
SciMLTesting = "1"
5454
StableRNGs = "1"
5555
Static = "1"
5656
SteadyStateDiffEq = "2.5.0"
@@ -73,11 +73,11 @@ NLsolve = "2774e3e8-f4cf-5e23-947b-6d7e65073b56"
7373
NonlinearSolve = "8913a72c-1f9b-4ce2-8d82-65094dcecaec"
7474
OrdinaryDiffEq = "1dea7af3-3e70-54e6-95c3-0bf5283fa5ed"
7575
OrdinaryDiffEqAdamsBashforthMoulton = "89bda076-bce5-4f1c-845f-551c83cdda9a"
76-
Pkg = "44cfe95a-1eb2-52ea-b672-e2afdf69b78f"
7776
SciMLSensitivity = "1ed8b502-d754-442c-8d5d-10ac956f44a1"
77+
SciMLTesting = "09d9d899-5365-40a9-917a-5f67fddea283"
7878
StableRNGs = "860ef19b-820b-49d6-a774-d7a799459cd3"
7979
Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40"
8080
Zygote = "e88e6eb3-aa80-5325-afca-941959d7151f"
8181

8282
[targets]
83-
test = ["Aqua", "Documenter", "ExplicitImports", "ForwardDiff", "Functors", "GPUArraysCore", "InteractiveUtils", "LuxTestUtils", "MLDataDevices", "NLsolve", "NonlinearSolve", "OrdinaryDiffEq", "OrdinaryDiffEqAdamsBashforthMoulton", "Pkg", "SafeTestsets", "SciMLSensitivity", "StableRNGs", "Test", "Zygote"]
83+
test = ["Aqua", "Documenter", "ExplicitImports", "ForwardDiff", "Functors", "GPUArraysCore", "InteractiveUtils", "LuxTestUtils", "MLDataDevices", "NLsolve", "NonlinearSolve", "OrdinaryDiffEq", "OrdinaryDiffEqAdamsBashforthMoulton", "SafeTestsets", "SciMLSensitivity", "SciMLTesting", "StableRNGs", "Test", "Zygote"]

test/qa/Project.toml

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
[deps]
2+
Aqua = "4c88cf16-eb10-579e-8560-4a9242c79595"
3+
DeepEquilibriumNetworks = "6748aba7-0e9b-415e-a410-ae3cc0ecb334"
4+
Documenter = "e30172f5-a6a5-5a46-863b-614d45cd2de4"
5+
ExplicitImports = "7d51a73a-1435-4ff3-83d9-f097790105c7"
6+
Lux = "b2108857-7c20-44ae-9111-449ecde12c47"
7+
NonlinearSolve = "8913a72c-1f9b-4ce2-8d82-65094dcecaec"
8+
OrdinaryDiffEq = "1dea7af3-3e70-54e6-95c3-0bf5283fa5ed"
9+
Random = "9a3f8284-a2c9-5f02-9a11-845980a1fd5c"
10+
SafeTestsets = "1bc83da4-3b8d-516f-aca4-4fe02f6d838f"
11+
SciMLSensitivity = "1ed8b502-d754-442c-8d5d-10ac956f44a1"
12+
SciMLTesting = "09d9d899-5365-40a9-917a-5f67fddea283"
13+
Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40"
14+
15+
[sources]
16+
DeepEquilibriumNetworks = {path = "../.."}
17+
18+
[compat]
19+
Aqua = "0.8"
20+
Documenter = "1"
21+
ExplicitImports = "1"
22+
Lux = "1"
23+
NonlinearSolve = "4"
24+
OrdinaryDiffEq = "6.74, 7"
25+
Random = "1.10"
26+
SciMLSensitivity = "7.43"
27+
SciMLTesting = "1"
28+
Test = "1.10"
29+
julia = "1.10"
File renamed without changes.

test/runtests.jl

Lines changed: 25 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,27 @@
1-
using Pkg
2-
using SafeTestsets, Test
1+
using SciMLTesting
2+
using SafeTestsets
33

4-
const GROUP = uppercase(get(ENV, "GROUP", "CPU"))
5-
6-
@info "Running tests for GROUP: $GROUP"
7-
8-
@time begin
9-
if GROUP == "CPU" || GROUP == "ALL"
10-
@time @safetestset "Utils Tests" include("utils_tests.jl")
11-
@time @safetestset "Layers Tests" include("layers_tests.jl")
12-
end
13-
14-
if GROUP == "QA"
15-
@time @safetestset "Quality Assurance Tests" include("qa_tests.jl")
16-
end
4+
# DEQ's GROUP semantics are backend/capability-based, not folder-partitioned: the
5+
# GPU group runs the *same* Core test files (utils_tests.jl + layers_tests.jl)
6+
# with shared_testsetup.jl's backend switched to CUDA via BACKEND_GROUP, so it
7+
# cannot be expressed as a separate folder of files. Hence explicit-args run_tests.
8+
function core_body()
9+
@safetestset "Utils Tests" include("utils_tests.jl")
10+
@safetestset "Layers Tests" include("layers_tests.jl")
1711
end
12+
13+
run_tests(;
14+
core = core_body,
15+
groups = Dict(
16+
# GPU is the self-hosted CUDA runner lane: the same Core suite with the
17+
# backend switched to CUDA.
18+
"GPU" => () -> begin
19+
ENV["BACKEND_GROUP"] = "CUDA"
20+
core_body()
21+
end,
22+
),
23+
qa = (; env = joinpath(@__DIR__, "qa"), body = joinpath(@__DIR__, "qa", "qa.jl")),
24+
# Curated "All": run only Core. GPU (self-hosted CUDA lane) and QA stay
25+
# selectable by name but out of the aggregate.
26+
all = ["Core"],
27+
)

test/shared_testsetup.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ end
1414

1515
GPUArraysCore.allowscalar(false)
1616

17-
cpu_testing() = BACKEND_GROUP == "all" || BACKEND_GROUP == "cpu"
17+
cpu_testing() = BACKEND_GROUP == "all" || BACKEND_GROUP == "cpu" || BACKEND_GROUP == "core"
1818
function cuda_testing()
1919
return (BACKEND_GROUP == "all" || BACKEND_GROUP == "cuda") &&
2020
MLDataDevices.functional(CUDADevice)

test/test_groups.toml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
[Core]
2+
versions = ["lts", "1"]
3+
4+
[QA]
5+
versions = ["lts", "1"]
6+
7+
[GPU]
8+
versions = ["1"]
9+
runner = ["self-hosted", "Linux", "X64", "gpu"]
10+
timeout = 240

0 commit comments

Comments
 (0)