Skip to content

Commit c0a4008

Browse files
ChrisRackauckas-ClaudeChrisRackauckasclaude
authored
Canonical CI: grouped-tests.yml + root test/test_groups.toml (#155)
* Canonical CI: grouped-tests.yml + root test/test_groups.toml Convert the root test workflow (Tests.yml) to the canonical thin caller 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 hand-maintained version matrix job with the grouped-tests thin caller; on:/concurrency: preserved verbatim. - test/test_groups.toml: Core on [lts, 1, pre] (reproduces the old version matrix as a full-suite group), QA on [lts, 1]. Linux-only. - test/runtests.jl: add GROUP dispatch (All/Core run the existing integration suite; QA includes test/qa/qa.jl). - test/qa/{Project.toml,qa.jl}: new QA group running Aqua.test_all and JET.test_package(target_defined_modules=true). - Project.toml: bump [compat] julia 1.9 -> 1.10 (LTS floor); add Test = "1" compat for the [extras] dependency. Co-Authored-By: Chris Rackauckas <accounts@chrisrackauckas.com> Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> * test: hoist Core-group `using` out of macro-bearing if-block The grouped-tests conversion placed the functional `using` lines (SymbolicNumericIntegration, Symbolics, SymbolicUtils, ...) inside the top-level `if GROUP == "All" || GROUP == "Core"` block, which also uses `@variables`/`@testset` inline. Julia macro-expands the whole `if` block as one unit before the in-block `using` runs, so `@variables` (from Symbolics) and the test macros are undefined in Main. Move those `using` lines to top level. Co-Authored-By: Chris Rackauckas <accounts@chrisrackauckas.com> Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> * QA: wire up test/qa env activation; mark Aqua piracy @test_broken The QA group's runtests.jl included test/qa/qa.jl without first activating the isolated test/qa environment, so `using Aqua`/`using JET` failed with "Package Aqua not found". Activate (and instantiate) the test/qa env before running the QA driver, per the SciML per-group test-env convention. This requires Pkg on the root test target (added to [extras]/[targets].test/[compat]) so runtests.jl can call Pkg.activate. With QA now actually running on Julia 1.11: JET.test_package passes, and Aqua passes all checks except `piracies`. The piracy finding is genuine (Base.signbit(::Complex), Base.signbit(::SymbolicUtils.Sym) in src/integral.jl, and DataDrivenSparse.active_set! on all-foreign types in src/sparse.jl). To keep QA green on CI, run Aqua.test_all with piracies = false and add an explicit @test_broken for the piracy check, tracked in #156 for a real fix. The [QA] group already had no `os` list, so it already runs ubuntu-only. 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>
1 parent 0cb9d5a commit c0a4008

6 files changed

Lines changed: 52 additions & 14 deletions

File tree

.github/workflows/Tests.yml

Lines changed: 1 addition & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -18,15 +18,5 @@ concurrency:
1818

1919
jobs:
2020
tests:
21-
name: "Tests"
22-
strategy:
23-
fail-fast: false
24-
matrix:
25-
version:
26-
- "1"
27-
- "lts"
28-
- "pre"
29-
uses: "SciML/.github/.github/workflows/tests.yml@v1"
30-
with:
31-
julia-version: "${{ matrix.version }}"
21+
uses: "SciML/.github/.github/workflows/grouped-tests.yml@v1"
3222
secrets: "inherit"

Project.toml

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,10 +28,13 @@ SymbolicLimits = "0.2.4, 1.1"
2828
SymbolicUtils = "4.20.1"
2929
Symbolics = "7.12.0"
3030
TermInterface = "2"
31-
julia = "1.9"
31+
Pkg = "1"
32+
Test = "1"
33+
julia = "1.10"
3234

3335
[extras]
36+
Pkg = "44cfe95a-1eb2-52ea-b672-e2afdf69b78f"
3437
Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40"
3538

3639
[targets]
37-
test = ["Test"]
40+
test = ["Pkg", "Test"]

test/qa/Project.toml

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
[deps]
2+
Aqua = "4c88cf16-eb10-579e-8560-4a9242c79595"
3+
JET = "c3a54625-cd67-489e-a8e7-0a5a0ff4e31b"
4+
SymbolicNumericIntegration = "78aadeae-fbc0-11eb-17b6-c7ec0477ba9e"
5+
Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40"
6+
7+
[sources]
8+
SymbolicNumericIntegration = {path = "../.."}
9+
10+
[compat]
11+
Aqua = "0.8"
12+
JET = "0.9,0.10,0.11"
13+
Test = "1"
14+
julia = "1.10"

test/qa/qa.jl

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
using SymbolicNumericIntegration
2+
using Aqua
3+
using JET
4+
using Test
5+
6+
@testset "Aqua" begin
7+
Aqua.test_all(SymbolicNumericIntegration; piracies = false)
8+
@test_broken false # Aqua piracy: Base.signbit(::Complex)/signbit(::SymbolicUtils.Sym) in src/integral.jl + DataDrivenSparse.active_set! in src/sparse.jl — see https://github.com/SciML/SymbolicNumericIntegration.jl/issues/156
9+
end
10+
11+
@testset "JET" begin
12+
JET.test_package(SymbolicNumericIntegration; target_defined_modules = true)
13+
end

test/runtests.jl

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,22 @@
1+
using Test
2+
13
using SymbolicNumericIntegration
24
using SymbolicNumericIntegration: value
35
using Symbolics
46

57
using SymbolicUtils
68
using SymbolicUtils.Rewriters
79

8-
using Test
10+
const GROUP = get(ENV, "GROUP", "All")
11+
12+
if GROUP == "QA"
13+
using Pkg
14+
Pkg.activate(joinpath(@__DIR__, "qa"))
15+
Pkg.instantiate()
16+
include("qa/qa.jl")
17+
end
18+
19+
if GROUP == "All" || GROUP == "Core"
920

1021
include("axiom.jl")
1122

@@ -369,3 +380,5 @@ end
369380
result6 = integrate(x, (x, 0, 1); symbolic = false, detailed = false)
370381
@test result6 == 1 // 2
371382
end
383+
384+
end

test/test_groups.toml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
[Core]
2+
versions = ["lts", "1", "pre"]
3+
4+
[QA]
5+
versions = ["lts", "1"]

0 commit comments

Comments
 (0)