diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml index 63019aa44..304e8dc95 100644 --- a/.github/workflows/CI.yml +++ b/.github/workflows/CI.yml @@ -47,7 +47,7 @@ jobs: - version: '1' os: ubuntu-latest arch: x86 - num_threads: 2 + num_threads: 1 # Windows - version: '1' os: windows-latest diff --git a/test/debug_utils.jl b/test/debug_utils.jl index dfa46affc..3fc877503 100644 --- a/test/debug_utils.jl +++ b/test/debug_utils.jl @@ -199,7 +199,14 @@ @test retype <: Tuple # Just make sure the following is runnable. - @test (DynamicPPL.DebugUtils.model_warntype(model); true) + # Suppress output to avoid GHA slowdown(?) + @test begin + oldstd = stdout + redirect_stdout(devnull) + DynamicPPL.DebugUtils.model_warntype(model) + redirect_stdout(oldstd) + true + end end end end diff --git a/test/lkj.jl b/test/lkj.jl index b9c20f916..d581cd21b 100644 --- a/test/lkj.jl +++ b/test/lkj.jl @@ -22,14 +22,14 @@ _lkj_atol = 0.05 model = lkj_prior_demo() # `SampleFromPrior` will sample in constrained space. @testset "SampleFromPrior" begin - samples = sample(model, SampleFromPrior(), 1_000) + samples = sample(model, SampleFromPrior(), 1_000; progress=false) @test mean(map(Base.Fix2(getindex, Colon()), samples)) ≈ target_mean atol = _lkj_atol end # `SampleFromUniform` will sample in unconstrained space. @testset "SampleFromUniform" begin - samples = sample(model, SampleFromUniform(), 1_000) + samples = sample(model, SampleFromUniform(), 1_000; progress=false) @test mean(map(Base.Fix2(getindex, Colon()), samples)) ≈ target_mean atol = _lkj_atol end @@ -39,7 +39,7 @@ end model = lkj_chol_prior_demo(uplo) # `SampleFromPrior` will sample in unconstrained space. @testset "SampleFromPrior" begin - samples = sample(model, SampleFromPrior(), 1_000) + samples = sample(model, SampleFromPrior(), 1_000; progress=false) # Build correlation matrix from factor corr_matrices = map(samples) do s M = reshape(s.metadata.vals, (2, 2)) @@ -50,7 +50,7 @@ end # `SampleFromUniform` will sample in unconstrained space. @testset "SampleFromUniform" begin - samples = sample(model, SampleFromUniform(), 1_000) + samples = sample(model, SampleFromUniform(), 1_000; progress=false) # Build correlation matrix from factor corr_matrices = map(samples) do s M = reshape(s.metadata.vals, (2, 2)) diff --git a/test/runtests.jl b/test/runtests.jl index aea02a337..a8d0e4603 100644 --- a/test/runtests.jl +++ b/test/runtests.jl @@ -42,7 +42,7 @@ Random.seed!(100) include("test_util.jl") -@testset "DynamicPPL.jl" begin +@testset verbose=true "DynamicPPL.jl" begin if GROUP == "All" || GROUP == "DynamicPPL" @testset "interface" begin include("utils.jl") @@ -114,6 +114,7 @@ include("test_util.jl") # This is a line that starts with "└ @ " and ends with the line number. r"└ @ .+:[0-9]+", ] + GC.gc() doctest(DynamicPPL; manual=false, doctestfilters=doctestfilters) end end