File tree Expand file tree Collapse file tree 3 files changed +59
-20
lines changed Expand file tree Collapse file tree 3 files changed +59
-20
lines changed Original file line number Diff line number Diff line change
1
+ # We want to only run doctests on a single version of Julia, because
2
+ # things like error messages / output can change between versions and
3
+ # is fragile to test against.
4
+ name : Doctests
5
+
6
+ on :
7
+ push :
8
+ branches :
9
+ - main
10
+ pull_request :
11
+ merge_group :
12
+ types : [checks_requested]
13
+
14
+ # needed to allow julia-actions/cache to delete old caches that it has created
15
+ permissions :
16
+ actions : write
17
+ contents : read
18
+
19
+ # Cancel existing tests on the same PR if a new commit is added to a pull request
20
+ concurrency :
21
+ group : ${{ github.workflow }}-${{ github.ref || github.run_id }}
22
+ cancel-in-progress : ${{ startsWith(github.ref, 'refs/pull/') }}
23
+
24
+ jobs :
25
+ test :
26
+ runs-on : ubuntu-latest
27
+
28
+ steps :
29
+ - uses : actions/checkout@v4
30
+
31
+ - uses : julia-actions/setup-julia@v2
32
+ with :
33
+ version : ' 1'
34
+
35
+ - uses : julia-actions/cache@v2
36
+
37
+ - uses : julia-actions/julia-buildpkg@v1
38
+
39
+ - name : Run doctests
40
+ shell : julia --color=yes --project=docs {0}
41
+ run : |
42
+ # Develop currently checked out version of DynamicPPL
43
+ using Pkg
44
+ Pkg.develop(path=pwd())
45
+
46
+ using Documenter
47
+ DocMeta.setdocmeta!(
48
+ DynamicPPL,
49
+ :DocTestSetup,
50
+ :(using DynamicPPL, Distributions);
51
+ recursive=true,
52
+ )
53
+ doctestfilters = [
54
+ # Ignore the source of a warning in the doctest output, since this is dependent on host.
55
+ # This is a line that starts with "└ @ " and ends with the line number.
56
+ r"└ @ .+:[0-9]+",
57
+ ]
58
+
59
+ doctest(DynamicPPL; manual=false, doctestfilters=doctestfilters)
Original file line number Diff line number Diff line change @@ -11,7 +11,6 @@ DifferentiationInterface = "a0c0ee7d-e4b9-4e03-894e-1c5f64a51d63"
11
11
Distributed = " 8ba89e20-285c-5b6f-9357-94700520ee1b"
12
12
Distributions = " 31c24e10-a181-5473-b8eb-7969acd0382f"
13
13
DistributionsAD = " ced4e74d-a319-5a8a-b0ac-84af2272839c"
14
- Documenter = " e30172f5-a6a5-5a46-863b-614d45cd2de4"
15
14
EnzymeCore = " f151be2c-9106-41f4-ab19-57ee4f262869"
16
15
ForwardDiff = " f6369f11-7733-5829-9624-2563aa707210"
17
16
JET = " c3a54625-cd67-489e-a8e7-0a5a0ff4e31b"
@@ -40,7 +39,6 @@ Compat = "4.3.0"
40
39
DifferentiationInterface = " 0.6.41"
41
40
Distributions = " 0.25"
42
41
DistributionsAD = " 0.6.3"
43
- Documenter = " 1"
44
42
EnzymeCore = " 0.6 - 0.8"
45
43
ForwardDiff = " 0.10.12"
46
44
JET = " 0.9, 0.10"
Original file line number Diff line number Diff line change @@ -7,7 +7,6 @@ using Bijectors
7
7
using DifferentiationInterface
8
8
using Distributions
9
9
using DistributionsAD
10
- using Documenter
11
10
using ForwardDiff
12
11
using LogDensityProblems
13
12
using MacroTools
@@ -97,22 +96,5 @@ include("test_util.jl")
97
96
@test_throws ErrorException prob " ..."
98
97
@test_throws ErrorException logprob " ..."
99
98
end
100
- if ! IS_PRERELEASE
101
- # Don't run doctests on prerelease as error messages etc. may vary
102
- @testset " doctests" begin
103
- DocMeta. setdocmeta! (
104
- DynamicPPL,
105
- :DocTestSetup ,
106
- :(using DynamicPPL, Distributions);
107
- recursive= true ,
108
- )
109
- doctestfilters = [
110
- # Ignore the source of a warning in the doctest output, since this is dependent on host.
111
- # This is a line that starts with "└ @ " and ends with the line number.
112
- r" └ @ .+:[0-9]+" ,
113
- ]
114
- doctest (DynamicPPL; manual= false , doctestfilters= doctestfilters)
115
- end
116
- end
117
99
end
118
100
end
You can’t perform that action at this time.
0 commit comments