diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml index 886724bd2..3ba5c4951 100644 --- a/.github/workflows/CI.yml +++ b/.github/workflows/CI.yml @@ -1,13 +1,7 @@ name: CI -on: - pull_request: - push: - branches: - - master - tags: '*' - workflow_dispatch: - merge_group: +on: push + concurrency: # Skip intermediate builds: always. @@ -23,13 +17,26 @@ jobs: fail-fast: false matrix: version: - - '1.3' - - '1' + - '1.10' + - '1.9' + - '1.8' + - '1.7' + - '1.6' - pre os: - ubuntu-latest - macos-latest - windows-latest + include: + - version: '1.7' + os: macos-12 + - version: '1.6' + os: macos-12 + exclude: + - version: '1.7' + os: macos-latest + - version: '1.6' + os: macos-latest steps: - uses: actions/checkout@v4 - uses: julia-actions/setup-julia@v2 @@ -47,11 +54,6 @@ jobs: Pkg.instantiate()' - run: julia --project=perf perf/samplers.jl - uses: julia-actions/julia-processcoverage@v1 - - uses: codecov/codecov-action@v4 - with: - token: ${{ secrets.CODECOV_TOKEN }} # required - fail_ci_if_error: true - files: lcov.info docs: name: Documentation runs-on: ubuntu-latest diff --git a/test/aqua.jl b/test/aqua.jl index 4dd8c0706..17b06f424 100644 --- a/test/aqua.jl +++ b/test/aqua.jl @@ -9,13 +9,10 @@ import Aqua Aqua.test_all( Distributions; ambiguities = false, - # On older Julia versions, installed dependencies are quite old - # Thus unbound type parameters show up that are fixed in newer versions - unbound_args = VERSION >= v"1.6", ) # Tests are not reliable on older Julia versions and # show ambiguities in loaded packages - if VERSION >= v"1.6" + if VERSION >= v"1.9" Aqua.test_ambiguities(Distributions) end end diff --git a/test/runtests.jl b/test/runtests.jl index c7d73f454..28d992544 100644 --- a/test/runtests.jl +++ b/test/runtests.jl @@ -165,7 +165,7 @@ const tests = [ printstyled("Running tests:\n", color=:blue) -Random.seed!(345679) +rng = MersenneTwister(345679) # to reduce redundancy, we might break this file down into separate `$t * "_utils.jl"` files include("testutils.jl") diff --git a/test/testutils.jl b/test/testutils.jl index 2859856a7..d9d24108d 100644 --- a/test/testutils.jl +++ b/test/testutils.jl @@ -50,10 +50,8 @@ function test_cgf(dist, ts) d(f) = Base.Fix1(ForwardDiff.derivative, f) κ₁ = d(Base.Fix1(cgf, dist))(0) @test κ₁ ≈ mean(dist) - if VERSION >= v"1.4" - κ₂ = d(d(Base.Fix1(cgf, dist)))(0) - @test κ₂ ≈ var(dist) - end + κ₂ = d(d(Base.Fix1(cgf, dist)))(0) + @test κ₂ ≈ var(dist) for t in ts val = @inferred cgf(dist, t) @test isfinite(val)