Skip to content

Commit

Permalink
Add conditions for doctests in test suite
Browse files Browse the repository at this point in the history
  • Loading branch information
abhro committed Jul 15, 2024
1 parent 1c3231c commit a917cbf
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions test/runtests.jl
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,14 @@ using Documenter

@testset "Cosmology" begin

DocMeta.setdocmeta!(Cosmology, :DocTestSetup, :(using Cosmology); recursive = true)
doctest(Cosmology)
# Doctest is good for CI, but has variation in system to system. For now,
# only run on supported systems as a measure that the docs are reasonably
# accurate.
doctest_conds = Bool[Sys.islinux(), Sys.ARCH == :x86_64]
if all(doctest_conds)
DocMeta.setdocmeta!(Cosmology, :DocTestSetup, :(using Cosmology); recursive = true)
doctest(Cosmology)
end

# values from http://icosmos.co.uk/

Expand Down

0 comments on commit a917cbf

Please sign in to comment.