Freeze doc manifests in reference tests
Now when Documenter puts out updates, our tests don't break.
This commit is contained in:
parent
8ef7e0032e
commit
87a1282b95
@ -49,9 +49,9 @@ uuid = "d6f4376e-aef5-505a-96c1-9c027394607a"
|
||||
|
||||
[[Mustache]]
|
||||
deps = ["Printf", "Tables"]
|
||||
git-tree-sha1 = "f39de3a12232eb47bd0629b3a661054287780276"
|
||||
git-tree-sha1 = "e06eef2abee113c49695f5347668e15d4c02978a"
|
||||
uuid = "ffc61752-8dc7-55ee-8c37-f3e9cdd09e70"
|
||||
version = "0.5.13"
|
||||
version = "1.0.0"
|
||||
|
||||
[[OrderedCollections]]
|
||||
deps = ["Random", "Serialization", "Test"]
|
||||
@ -66,7 +66,7 @@ uuid = "d96e819e-fc66-5662-9728-84c9c7592b0a"
|
||||
version = "0.12.0"
|
||||
|
||||
[[Pkg]]
|
||||
deps = ["Dates", "LibGit2", "Markdown", "Printf", "REPL", "Random", "SHA", "UUIDs"]
|
||||
deps = ["Dates", "LibGit2", "Libdl", "Logging", "Markdown", "Printf", "REPL", "Random", "SHA", "UUIDs"]
|
||||
uuid = "44cfe95a-1eb2-52ea-b672-e2afdf69b78f"
|
||||
|
||||
[[Printf]]
|
||||
|
15
test/fixtures/WackyOptions/docs/Manifest.toml
vendored
15
test/fixtures/WackyOptions/docs/Manifest.toml
vendored
@ -18,10 +18,10 @@ uuid = "ffbed154-4ef7-542d-bbb7-c09d3a79fcae"
|
||||
version = "0.8.1"
|
||||
|
||||
[[Documenter]]
|
||||
deps = ["Base64", "DocStringExtensions", "InteractiveUtils", "JSON", "LibGit2", "Logging", "Markdown", "REPL", "Test", "Unicode"]
|
||||
git-tree-sha1 = "d45c163c7a3ae293c15361acc52882c0f853f97c"
|
||||
deps = ["Base64", "Dates", "DocStringExtensions", "InteractiveUtils", "JSON", "LibGit2", "Logging", "Markdown", "REPL", "Test", "Unicode"]
|
||||
git-tree-sha1 = "0be9bf63e854a2408c2ecd3c600d68d4d87d8a73"
|
||||
uuid = "e30172f5-a6a5-5a46-863b-614d45cd2de4"
|
||||
version = "0.23.4"
|
||||
version = "0.24.2"
|
||||
|
||||
[[InteractiveUtils]]
|
||||
deps = ["Markdown"]
|
||||
@ -36,6 +36,9 @@ version = "0.21.0"
|
||||
[[LibGit2]]
|
||||
uuid = "76f85450-5226-5b5a-8eaa-529ad045b433"
|
||||
|
||||
[[Libdl]]
|
||||
uuid = "8f399da3-3557-5675-b5ff-fb832c97cbdb"
|
||||
|
||||
[[Logging]]
|
||||
uuid = "56ddb016-857b-54e1-b83d-db4d58db5568"
|
||||
|
||||
@ -48,12 +51,12 @@ uuid = "a63ad114-7e13-5084-954f-fe012c677804"
|
||||
|
||||
[[Parsers]]
|
||||
deps = ["Dates", "Test"]
|
||||
git-tree-sha1 = "c56ecb484f286639f161e712b8311f5ab77e8d32"
|
||||
git-tree-sha1 = "0139ba59ce9bc680e2925aec5b7db79065d60556"
|
||||
uuid = "69de0a69-1ddd-5017-9359-2bf0b02dc9f0"
|
||||
version = "0.3.8"
|
||||
version = "0.3.10"
|
||||
|
||||
[[Pkg]]
|
||||
deps = ["Dates", "LibGit2", "Markdown", "Printf", "REPL", "Random", "SHA", "UUIDs"]
|
||||
deps = ["Dates", "LibGit2", "Libdl", "Logging", "Markdown", "Printf", "REPL", "Random", "SHA", "UUIDs"]
|
||||
uuid = "44cfe95a-1eb2-52ea-b672-e2afdf69b78f"
|
||||
|
||||
[[Printf]]
|
||||
|
@ -1,12 +1,29 @@
|
||||
const STATIC_FILE = joinpath(@__DIR__, "fixtures", "static.txt")
|
||||
const STATIC_DOCUMENTER = [
|
||||
PackageSpec(; name="DocStringExtensions", version=v"0.8.1"),
|
||||
PackageSpec(; name="Documenter", version=v"0.24.2"),
|
||||
PackageSpec(; name="JSON", version=v"0.21.0"),
|
||||
PackageSpec(; name="Parsers", version=v"0.3.10"),
|
||||
]
|
||||
|
||||
PT.user_view(::Citation, ::Template, ::AbstractString) = Dict("MONTH" => 8, "YEAR" => 2019)
|
||||
PT.user_view(::License, ::Template, ::AbstractString) = Dict("YEAR" => 2019)
|
||||
|
||||
function pin_documenter(project_dir::AbstractString)
|
||||
@suppress PT.with_project(project_dir) do
|
||||
foreach(Pkg.add, STATIC_DOCUMENTER)
|
||||
end
|
||||
toml = joinpath(project_dir, "Project.toml")
|
||||
project = TOML.parsefile(toml)
|
||||
filter!(p -> p.first == "Documenter", project["deps"])
|
||||
open(io -> TOML.print(io, project), toml, "w")
|
||||
end
|
||||
|
||||
function test_all(pkg::AbstractString; kwargs...)
|
||||
t = tpl(; kwargs...)
|
||||
with_pkg(t, pkg) do pkg
|
||||
pkg_dir = joinpath(t.dir, pkg)
|
||||
PT.hasplugin(t, Documenter) && pin_documenter(joinpath(pkg_dir, "docs"))
|
||||
foreach(readlines(`git -C $pkg_dir ls-files`)) do f
|
||||
reference = joinpath(@__DIR__, "fixtures", pkg, f)
|
||||
observed = read(joinpath(pkg_dir, f), String)
|
||||
@ -42,7 +59,7 @@ end
|
||||
|
||||
@testset "Wacky options" begin
|
||||
test_all("WackyOptions"; authors=USER, julia=v"1.2", plugins=[
|
||||
AppVeyor(; x86=true, coverage=true, extra_versions=[v"1.3"]),
|
||||
AppVeyor(; x86=true, coverage=true, extra_versions=[v"1.1"]),
|
||||
CirrusCI(; image="freebsd-123", coverage=false, extra_versions=["1.1"]),
|
||||
Citation(; readme=true),
|
||||
Codecov(; file=STATIC_FILE),
|
||||
|
@ -1,7 +1,7 @@
|
||||
using Base.Filesystem: contractuser, path_separator
|
||||
|
||||
using LibGit2: LibGit2, GitCommit, GitRemote, GitRepo
|
||||
using Pkg: Pkg
|
||||
using Pkg: Pkg, PackageSpec, TOML
|
||||
using Random: Random, randstring
|
||||
using Test: @test, @testset, @test_logs, @test_throws
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user