Skip to content

Commit 86be8b1

Browse files
committed
Move doctest invocation back to test/runtests.jl
1 parent af76f81 commit 86be8b1

File tree

4 files changed

+18
-24
lines changed

4 files changed

+18
-24
lines changed

.github/workflows/DocTest.yml

Lines changed: 3 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -36,26 +36,6 @@ jobs:
3636

3737
- uses: julia-actions/julia-buildpkg@v1
3838

39-
- name: Run doctests
40-
shell: julia --color=yes --depwarn=yes --project=docs {0}
41-
run: |
42-
# Develop currently checked out version of DynamicPPL
43-
using Pkg
44-
Pkg.develop(path=pwd())
45-
Pkg.instantiate()
46-
47-
using Documenter, DynamicPPL, Distributions
48-
49-
DocMeta.setdocmeta!(
50-
DynamicPPL,
51-
:DocTestSetup,
52-
:(using DynamicPPL, Distributions);
53-
recursive=true,
54-
)
55-
doctestfilters = [
56-
# Ignore the source of a warning in the doctest output, since this is dependent on host.
57-
# This is a line that starts with "└ @ " and ends with the line number.
58-
r"└ @ .+:[0-9]+",
59-
]
60-
61-
doctest(DynamicPPL; manual=false, doctestfilters=doctestfilters)
39+
- uses: julia-actions/julia-runtest@v1
40+
env:
41+
GROUP: Doctests

docs/Project.toml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
[deps]
2-
ADTypes = "47edcb42-4c32-4615-8424-f2b9edc5f35b"
32
AbstractPPL = "7a57a42e-76ec-4ea3-a279-07e840d6d9cf"
43
Accessors = "7d9f7c33-5ae7-4f3b-8dc6-eff91059b697"
54
DataStructures = "864edb3b-99cc-5e75-8d2d-829cb0a9cfe8"

test/Project.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ DifferentiationInterface = "a0c0ee7d-e4b9-4e03-894e-1c5f64a51d63"
1111
Distributed = "8ba89e20-285c-5b6f-9357-94700520ee1b"
1212
Distributions = "31c24e10-a181-5473-b8eb-7969acd0382f"
1313
DistributionsAD = "ced4e74d-a319-5a8a-b0ac-84af2272839c"
14+
Documenter = "e30172f5-a6a5-5a46-863b-614d45cd2de4"
1415
EnzymeCore = "f151be2c-9106-41f4-ab19-57ee4f262869"
1516
ForwardDiff = "f6369f11-7733-5829-9624-2563aa707210"
1617
JET = "c3a54625-cd67-489e-a8e7-0a5a0ff4e31b"

test/runtests.jl

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ using Bijectors
77
using DifferentiationInterface
88
using Distributions
99
using DistributionsAD
10+
using Documenter
1011
using ForwardDiff
1112
using LogDensityProblems
1213
using MacroTools
@@ -97,4 +98,17 @@ include("test_util.jl")
9798
@test_throws ErrorException logprob"..."
9899
end
99100
end
101+
102+
if GROUP == "All" || GROUP == "Doctests"
103+
DocMeta.setdocmeta!(
104+
DynamicPPL, :DocTestSetup, :(using DynamicPPL, Distributions); recursive=true
105+
)
106+
doctestfilters = [
107+
# Ignore the source of a warning in the doctest output, since this is dependent on host.
108+
# This is a line that starts with "└ @ " and ends with the line number.
109+
r"└ @ .+:[0-9]+",
110+
]
111+
112+
doctest(DynamicPPL; manual=false, doctestfilters=doctestfilters)
113+
end
100114
end

0 commit comments

Comments
 (0)