Update deps/fixtures, skip more tests when Git is not installed

TODO: We need to figure something out to stop dependency versions from
constantly changing in the fixture manifests, because that's going to
get annoying to update all the time. I still want it to be included in
the tests, though.
This commit is contained in:
Chris de Graaf 2019-10-16 22:39:46 +07:00
parent 69a7c5c68b
commit eac2a1278d
No known key found for this signature in database
GPG Key ID: 150FFDD9B0073C7B
4 changed files with 30 additions and 16 deletions

View File

@ -13,15 +13,15 @@ uuid = "8ba89e20-285c-5b6f-9357-94700520ee1b"
[[DocStringExtensions]]
deps = ["LibGit2", "Markdown", "Pkg", "Test"]
git-tree-sha1 = "0513f1a8991e9d83255e0140aace0d0fc4486600"
git-tree-sha1 = "88bb0edb352b16608036faadcc071adda068582a"
uuid = "ffbed154-4ef7-542d-bbb7-c09d3a79fcae"
version = "0.8.0"
version = "0.8.1"
[[Documenter]]
deps = ["Base64", "DocStringExtensions", "InteractiveUtils", "JSON", "LibGit2", "Logging", "Markdown", "REPL", "Test", "Unicode"]
git-tree-sha1 = "1b6ae3796f60311e39cd1770566140d2c056e87f"
git-tree-sha1 = "d45c163c7a3ae293c15361acc52882c0f853f97c"
uuid = "e30172f5-a6a5-5a46-863b-614d45cd2de4"
version = "0.23.3"
version = "0.23.4"
[[InteractiveUtils]]
deps = ["Markdown"]

View File

@ -32,7 +32,7 @@ function gitignore(p::Git)
end
function validate(p::Git, t::Template)
if p.gpgsign && try run(pipeline(`git --version`; stdout=devnull)); false catch; true end
if p.gpgsign && !git_is_installed()
throw(ArgumentError("Git: gpgsign is set but the Git CLI is not installed"))
end
@ -97,6 +97,15 @@ end
needs_username(::Git) = true
function git_is_installed()
return try
run(pipeline(`git --version`; stdout=devnull))
true
catch
false
end
end
if isdefined(Pkg, :dependencies)
function version_of(pkg::AbstractString)
for p in values(Pkg.dependencies())

View File

@ -13,15 +13,15 @@ uuid = "8ba89e20-285c-5b6f-9357-94700520ee1b"
[[DocStringExtensions]]
deps = ["LibGit2", "Markdown", "Pkg", "Test"]
git-tree-sha1 = "0513f1a8991e9d83255e0140aace0d0fc4486600"
git-tree-sha1 = "88bb0edb352b16608036faadcc071adda068582a"
uuid = "ffbed154-4ef7-542d-bbb7-c09d3a79fcae"
version = "0.8.0"
version = "0.8.1"
[[Documenter]]
deps = ["Base64", "DocStringExtensions", "InteractiveUtils", "JSON", "LibGit2", "Logging", "Markdown", "REPL", "Test", "Unicode"]
git-tree-sha1 = "1b6ae3796f60311e39cd1770566140d2c056e87f"
git-tree-sha1 = "d45c163c7a3ae293c15361acc52882c0f853f97c"
uuid = "e30172f5-a6a5-5a46-863b-614d45cd2de4"
version = "0.23.3"
version = "0.23.4"
[[InteractiveUtils]]
deps = ["Markdown"]

View File

@ -44,9 +44,11 @@ mktempdir() do dir
@testset "PkgTemplates.jl" begin
include("template.jl")
include("plugin.jl")
include("git.jl")
include("show.jl")
if PT.git_is_installed()
include("git.jl")
# Quite a bit of output depends on the Julia version,
# and the test fixtures are made with Julia 1.2.
# TODO: Keep this on the latest stable Julia version.
@ -55,6 +57,9 @@ mktempdir() do dir
else
@info "Skipping reference tests" julia=VERSION
end
else
@info "Git is not installed, skipping Git and reference tests"
end
end
finally
popfirst!(DEPOT_PATH)