From e01e8e2b550184d5dc95f2002decf59165362ae9 Mon Sep 17 00:00:00 2001 From: Chris de Graaf Date: Tue, 5 Dec 2017 20:04:17 +0000 Subject: [PATCH] Add environment variable for faster tests --- test/runtests.jl | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/test/runtests.jl b/test/runtests.jl index a766f28..c4fbac2 100644 --- a/test/runtests.jl +++ b/test/runtests.jl @@ -8,7 +8,12 @@ import PkgTemplates: badges, version_floor, substitute, read_license, gen_file, mktempdir() do temp_dir withenv("JULIA_PKGDIR" => temp_dir) do - Pkg.init() + # We technically don't need to clone METADATA to run tests. + if get(ENV, "PKGTEMPLATES_TEST_FAST", "false") == "true" + mkdir(joinpath(temp_dir, "v$(version_floor())")) + else + Pkg.init() + end cd(temp_dir) do @testset "PkgTemplates.jl" begin include("tests.jl")