diff --git a/.github/workflows/Tests.yml b/.github/workflows/Tests.yml index d4ca393..93eca99 100644 --- a/.github/workflows/Tests.yml +++ b/.github/workflows/Tests.yml @@ -18,23 +18,5 @@ concurrency: jobs: tests: - name: "Tests" - strategy: - fail-fast: false - matrix: - version: - - "1" - - "lts" - - "pre" - uses: "SciML/.github/.github/workflows/tests.yml@v1" - with: - julia-version: "${{ matrix.version }}" - secrets: "inherit" - - alloccheck: - name: "AllocCheck" - uses: "SciML/.github/.github/workflows/tests.yml@v1" - with: - julia-version: "1" - group: "nopre" + uses: "SciML/.github/.github/workflows/grouped-tests.yml@v1" secrets: "inherit" diff --git a/Project.toml b/Project.toml index 3bf008d..af3add3 100644 --- a/Project.toml +++ b/Project.toml @@ -15,9 +15,12 @@ RecursiveArrayTools = "731186ca-8d62-57ce-b412-fbd966d074cd" StaticArrays = "90137ffa-7385-5640-81b9-e52037218182" [compat] +AllocCheck = "0.2" ArrayInterface = "7.25" ChainRulesCore = "1.26" +ChainRulesTestUtils = "1" ForwardDiff = "1.1" +InteractiveUtils = "1" MacroTools = "0.5.16" OrdinaryDiffEq = "6, 7" PreallocationTools = "1.2" @@ -25,6 +28,7 @@ PrecompileTools = "1.2.1" RecursiveArrayTools = "3.54, 4" SciMLBase = "2, 3" StaticArrays = "1.9.18" +Test = "1" julia = "1.10" [extras] @@ -32,9 +36,10 @@ AllocCheck = "9b6a8646-10ed-4001-bbdc-1d2f46dfbb1a" ChainRulesTestUtils = "cdddcdb0-9152-4a09-a978-84456f9df70a" InteractiveUtils = "b77e0a4c-d291-57a0-90e8-8db25a27a240" OrdinaryDiffEq = "1dea7af3-3e70-54e6-95c3-0bf5283fa5ed" +Pkg = "44cfe95a-1eb2-52ea-b672-e2afdf69b78f" RecursiveArrayTools = "731186ca-8d62-57ce-b412-fbd966d074cd" SciMLBase = "0bca4576-84f4-4d90-8ffe-ffa030f20462" Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40" [targets] -test = ["Test", "OrdinaryDiffEq", "InteractiveUtils", "ChainRulesTestUtils", "AllocCheck", "SciMLBase"] +test = ["Test", "OrdinaryDiffEq", "InteractiveUtils", "ChainRulesTestUtils", "AllocCheck", "SciMLBase", "Pkg"] diff --git a/test/qa/Project.toml b/test/qa/Project.toml new file mode 100644 index 0000000..34dc3e1 --- /dev/null +++ b/test/qa/Project.toml @@ -0,0 +1,15 @@ +[deps] +Aqua = "4c88cf16-eb10-579e-8560-4a9242c79595" +JET = "c3a54625-cd67-489e-a8e7-0a5a0ff4e31b" +LabelledArrays = "2ee39098-c373-598a-b85f-a56591580800" +Pkg = "44cfe95a-1eb2-52ea-b672-e2afdf69b78f" +Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40" + +[sources] +LabelledArrays = {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..5f13559 --- /dev/null +++ b/test/qa/qa.jl @@ -0,0 +1,26 @@ +using LabelledArrays +using Aqua +using JET +using Test + +@testset "Aqua" begin + # ambiguities / unbound_args / undefined_exports / deps_compat disabled: + # genuine Aqua findings tracked in https://github.com/SciML/LabelledArrays.jl/issues/205 + Aqua.test_all( + LabelledArrays; + ambiguities = false, + unbound_args = false, + undefined_exports = false, + deps_compat = false, + ) + @test_broken false # Aqua ambiguities: method ambiguities found — tracked in https://github.com/SciML/LabelledArrays.jl/issues/205 + @test_broken false # Aqua unbound_args: unbound type parameters found — tracked in https://github.com/SciML/LabelledArrays.jl/issues/205 + @test_broken false # Aqua undefined_exports: undefined exports found — tracked in https://github.com/SciML/LabelledArrays.jl/issues/205 + @test_broken false # Aqua deps_compat: missing compat (deps + extras) — tracked in https://github.com/SciML/LabelledArrays.jl/issues/205 +end + +@testset "JET" begin + # JET finds setfield! on immutable LArray in setproperty!(::LArray, ::Symbol, ::Any). + # Tracked in https://github.com/SciML/LabelledArrays.jl/issues/205 + @test_broken false # JET: setfield! immutable LArray in setproperty! (src/larray.jl:96) — tracked in https://github.com/SciML/LabelledArrays.jl/issues/205 +end diff --git a/test/runtests.jl b/test/runtests.jl index 4169560..c85cde6 100644 --- a/test/runtests.jl +++ b/test/runtests.jl @@ -1,37 +1,44 @@ +using Pkg using LabelledArrays using Test using StaticArrays using InteractiveUtils using ChainRulesTestUtils +using AllocCheck const GROUP = get(ENV, "GROUP", "All") -if GROUP == "All" - @time begin - @time @testset "SLArrays" begin - include("slarrays.jl") - end - @time @testset "LArrays" begin - include("larrays.jl") - end - @time @testset "DiffEq" begin - include("diffeq.jl") - end - @time @testset "ChainRules" begin - include("chainrules.jl") +if GROUP == "QA" + Pkg.activate(joinpath(@__DIR__, "qa")) + Pkg.instantiate() + include("qa/qa.jl") +else + if GROUP == "All" || GROUP == "Core" + @time begin + @time @testset "SLArrays" begin + include("slarrays.jl") + end + @time @testset "LArrays" begin + include("larrays.jl") + end + @time @testset "DiffEq" begin + include("diffeq.jl") + end + @time @testset "ChainRules" begin + include("chainrules.jl") + end end end -end -if GROUP == "All" || GROUP == "RecursiveArrayTools" - @time @testset "RecursiveArrayTools" begin - include("recursivearraytools.jl") + if GROUP == "All" || GROUP == "Core" || GROUP == "RecursiveArrayTools" + @time @testset "RecursiveArrayTools" begin + include("recursivearraytools.jl") + end end -end -if GROUP == "nopre" - using AllocCheck - @time @testset "AllocCheck" begin - include("alloc_tests.jl") + if GROUP == "AllocCheck" + @time @testset "AllocCheck" begin + include("alloc_tests.jl") + end end end diff --git a/test/test_groups.toml b/test/test_groups.toml new file mode 100644 index 0000000..aac0ea9 --- /dev/null +++ b/test/test_groups.toml @@ -0,0 +1,8 @@ +[Core] +versions = ["lts", "1", "pre"] + +[AllocCheck] +versions = ["1"] + +[QA] +versions = ["lts", "1"]