diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 1d82cf5..22f0fa5 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -26,6 +26,7 @@ jobs: fail-fast: false matrix: version: + - 'min' - 'lts' - '1' os: diff --git a/Project.toml b/Project.toml index fbc68ec..f3efdf3 100644 --- a/Project.toml +++ b/Project.toml @@ -25,6 +25,7 @@ Documenter = "1" FillArrays = "1" LinearAlgebra = "1" MatrixFactorizations = "1, 2, 3" +ParallelTestRunner = "2" Random = "1" SparseArrays = "1" Test = "1" @@ -33,9 +34,10 @@ julia = "1.10" [extras] Aqua = "4c88cf16-eb10-579e-8560-4a9242c79595" Documenter = "e30172f5-a6a5-5a46-863b-614d45cd2de4" +ParallelTestRunner = "d3525ed8-44d0-4b2c-a655-542cee43accc" Random = "9a3f8284-a2c9-5f02-9a11-845980a1fd5c" SparseArrays = "2f01184e-e22b-5df5-ae63-d93ebab69eaf" Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40" [targets] -test = ["Aqua", "Random", "SparseArrays", "Test", "Documenter"] +test = ["Aqua", "ParallelTestRunner", "Random", "SparseArrays", "Test", "Documenter"] diff --git a/test/runtests.jl b/test/runtests.jl index d5d1645..a017f93 100644 --- a/test/runtests.jl +++ b/test/runtests.jl @@ -1,28 +1,20 @@ using BlockBandedMatrices -using Test +using ParallelTestRunner -import Aqua -downstream_test = "--downstream_integration_test" in ARGS -@testset "Project quality" begin - Aqua.test_all(BlockBandedMatrices, ambiguities=false, piracies=false, - stale_deps=!downstream_test) +const init_code = quote + using Test + using BlockBandedMatrices end -using Documenter -@testset "docstrings" begin - # don't test docstrings on old versions to avoid failures due to changes in types - if VERSION >= v"1.9" - DocMeta.setdocmeta!(BlockBandedMatrices, :DocTestSetup, :(using BlockBandedMatrices); recursive=true) - doctest(BlockBandedMatrices) - end +# Start with autodiscovered tests +testsuite = find_tests(pwd()) + +if "--downstream_integration_test" in ARGS + delete!(testsuite, "test_aqua") end -include("test_blockbanded.jl") -include("test_blockskyline.jl") -include("test_bandedblockbanded.jl") -include("test_broadcasting.jl") -include("test_linalg.jl") -include("test_misc.jl") -include("test_triblockbanded.jl") -include("test_adjtransblockbanded.jl") -include("test_blockskylineqr.jl") +filtered_args = filter(!=("--downstream_integration_test"), ARGS) +# Parse arguments +args = parse_args(filtered_args) + +runtests(BlockBandedMatrices, args; init_code, testsuite) diff --git a/test/test_aqua.jl b/test/test_aqua.jl new file mode 100644 index 0000000..75b6589 --- /dev/null +++ b/test/test_aqua.jl @@ -0,0 +1,4 @@ +import Aqua +@testset "Project quality" begin + Aqua.test_all(BlockBandedMatrices, ambiguities=false, piracies=false) +end diff --git a/test/test_docstrings.jl b/test/test_docstrings.jl new file mode 100644 index 0000000..4fbd700 --- /dev/null +++ b/test/test_docstrings.jl @@ -0,0 +1,8 @@ +using Documenter +@testset "docstrings" begin + # don't test docstrings on old versions to avoid failures due to changes in types + if VERSION >= v"1.9" + DocMeta.setdocmeta!(BlockBandedMatrices, :DocTestSetup, :(using BlockBandedMatrices); recursive=true) + doctest(BlockBandedMatrices) + end +end