From fe9aab772dc1149e860c12247948f26fa5c5517d Mon Sep 17 00:00:00 2001 From: Tim Holy Date: Tue, 28 Apr 2020 08:03:11 -0500 Subject: [PATCH 1/4] CI: run tests with & without Revise --- .travis.yml | 10 ++++++---- Project.toml | 9 +++++---- test/runtests.jl | 7 ++++++- 3 files changed, 17 insertions(+), 9 deletions(-) diff --git a/.travis.yml b/.travis.yml index 570b1b0..98b9a84 100644 --- a/.travis.yml +++ b/.travis.yml @@ -20,10 +20,12 @@ notifications: script: - export JULIA_PROJECT="" - - julia --project -e 'using Pkg; Pkg.build(); Pkg.test();' - - julia -e 'using Pkg; Pkg.develop(PackageSpec(path=".")); - Pkg.add(PackageSpec(url="https://github.com/timholy/Revise.jl")); - Pkg.test("Revise")' + - julia --project -e 'using Pkg; Pkg.build(); Pkg.test(;coverage=true);' + - julia --project -e 'using Pkg; + Pkg.build(); + Pkg.add(PackageSpec(url="https://github.com/timholy/Revise.jl")); + VERSION >= v"1.3" && Pkg.test(; coverage=true, test_args=["revise"]); + Pkg.test("Revise"; coverage=true)' after_success: - julia -e 'import Pkg; Pkg.add("Coverage"); using Coverage; Codecov.submit(Codecov.process_folder())' diff --git a/Project.toml b/Project.toml index d03459d..e651825 100644 --- a/Project.toml +++ b/Project.toml @@ -7,12 +7,13 @@ version = "0.5.9" InteractiveUtils = "b77e0a4c-d291-57a0-90e8-8db25a27a240" UUIDs = "cf7118a7-6976-5b1a-9a39-7adc72f591a4" +[compat] +julia = "1" + [extras] ColorTypes = "3da002f7-5984-5a60-b8a6-cbb66c0b333f" +Pkg = "44cfe95a-1eb2-52ea-b672-e2afdf69b78f" Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40" -[compat] -julia = "1" - [targets] -test = ["Test", "ColorTypes"] +test = ["Test", "ColorTypes", "Pkg"] diff --git a/test/runtests.jl b/test/runtests.jl index c8f9bc6..902fd6e 100644 --- a/test/runtests.jl +++ b/test/runtests.jl @@ -1,11 +1,16 @@ # Note: some of CodeTracking's functionality can only be tested by Revise using CodeTracking -using Test, InteractiveUtils +using Test, InteractiveUtils, Pkg # Note: ColorTypes needs to be installed, but note the intentional absence of `using ColorTypes` using CodeTracking: line_is_decl +if !isempty(ARGS) && "revise" ∈ ARGS + Pkg.add(PackageSpec(url="https://github.com/timholy/Revise.jl")) + using Revise +end + isdefined(Main, :Revise) ? includet("script.jl") : include("script.jl") @testset "CodeTracking.jl" begin From 211c29063a0c1bd53ea7dbafede72337d403cd2c Mon Sep 17 00:00:00 2001 From: Tim Holy Date: Wed, 29 Apr 2020 06:03:55 -0500 Subject: [PATCH 2/4] Try again --- .travis.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.travis.yml b/.travis.yml index 98b9a84..953426a 100644 --- a/.travis.yml +++ b/.travis.yml @@ -20,10 +20,10 @@ notifications: script: - export JULIA_PROJECT="" - - julia --project -e 'using Pkg; Pkg.build(); Pkg.test(;coverage=true);' - - julia --project -e 'using Pkg; - Pkg.build(); - Pkg.add(PackageSpec(url="https://github.com/timholy/Revise.jl")); + - julia --project -e 'using Pkg; Pkg.build(); + Pkg.test(;coverage=true); + Pkg.activate(mktempdir()); + Pkg.develop([PackageSpec(name="Revise"), PackageSpec(path=".")]); VERSION >= v"1.3" && Pkg.test(; coverage=true, test_args=["revise"]); Pkg.test("Revise"; coverage=true)' From c63506c1a9c2cac147f5c307781a60028ef7d059 Mon Sep 17 00:00:00 2001 From: Tim Holy Date: Wed, 29 Apr 2020 06:09:12 -0500 Subject: [PATCH 3/4] More stuff --- Project.toml | 3 +-- test/runtests.jl | 3 +-- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/Project.toml b/Project.toml index e651825..096c18a 100644 --- a/Project.toml +++ b/Project.toml @@ -12,8 +12,7 @@ julia = "1" [extras] ColorTypes = "3da002f7-5984-5a60-b8a6-cbb66c0b333f" -Pkg = "44cfe95a-1eb2-52ea-b672-e2afdf69b78f" Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40" [targets] -test = ["Test", "ColorTypes", "Pkg"] +test = ["Test", "ColorTypes"] diff --git a/test/runtests.jl b/test/runtests.jl index 902fd6e..29acb3c 100644 --- a/test/runtests.jl +++ b/test/runtests.jl @@ -1,13 +1,12 @@ # Note: some of CodeTracking's functionality can only be tested by Revise using CodeTracking -using Test, InteractiveUtils, Pkg +using Test, InteractiveUtils # Note: ColorTypes needs to be installed, but note the intentional absence of `using ColorTypes` using CodeTracking: line_is_decl if !isempty(ARGS) && "revise" ∈ ARGS - Pkg.add(PackageSpec(url="https://github.com/timholy/Revise.jl")) using Revise end From fd38fa48a848c86b0d69c042e97c98174785aedc Mon Sep 17 00:00:00 2001 From: Tim Holy Date: Wed, 29 Apr 2020 06:22:58 -0500 Subject: [PATCH 4/4] this? --- .travis.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.travis.yml b/.travis.yml index 953426a..7846507 100644 --- a/.travis.yml +++ b/.travis.yml @@ -21,10 +21,10 @@ notifications: script: - export JULIA_PROJECT="" - julia --project -e 'using Pkg; Pkg.build(); - Pkg.test(;coverage=true); + Pkg.test(coverage=true); Pkg.activate(mktempdir()); Pkg.develop([PackageSpec(name="Revise"), PackageSpec(path=".")]); - VERSION >= v"1.3" && Pkg.test(; coverage=true, test_args=["revise"]); + VERSION >= v"1.3" && Pkg.test("CodeTracking"; coverage=true, test_args=["revise"]); Pkg.test("Revise"; coverage=true)' after_success: