From 7dbee233771861a623fa7c04ea9d21fcc0eac5fc Mon Sep 17 00:00:00 2001 From: Emil Ljungskog Date: Wed, 3 Jul 2019 16:06:56 +0200 Subject: [PATCH] Re-enable coverage stats. --- .travis.yml | 3 ++- test/coverage/Project.toml | 3 +++ test/coverage/coverage.jl | 10 ++++++++++ 3 files changed, 15 insertions(+), 1 deletion(-) create mode 100644 test/coverage/Project.toml create mode 100644 test/coverage/coverage.jl diff --git a/.travis.yml b/.travis.yml index ae50fba..9527c77 100644 --- a/.travis.yml +++ b/.travis.yml @@ -17,7 +17,8 @@ notifications: # - if [[ -a .git/shallow ]]; then git fetch --unshallow; fi # - julia -e 'Pkg.clone(pwd()); Pkg.build("ScatteredInterpolation"); Pkg.test("ScatteredInterpolation"; coverage=true)' after_success: - - julia -e 'cd(Pkg.dir("ScatteredInterpolation")); Pkg.add("Coverage"); using Coverage; Codecov.submit(Codecov.process_folder())' + - julia --project=test/coverage -e 'using Pkg; Pkg.instantiate()' + - julia --project=test/coverage test/coverage/coverage.jl jobs: include: diff --git a/test/coverage/Project.toml b/test/coverage/Project.toml new file mode 100644 index 0000000..383d4f3 --- /dev/null +++ b/test/coverage/Project.toml @@ -0,0 +1,3 @@ +[deps] +Coverage = "a2441757-f6aa-5fb2-8edb-039e3f45d037" + diff --git a/test/coverage/coverage.jl b/test/coverage/coverage.jl new file mode 100644 index 0000000..94c2fba --- /dev/null +++ b/test/coverage/coverage.jl @@ -0,0 +1,10 @@ +# only push coverage from one bot +get(ENV, "TRAVIS_OS_NAME", nothing) == "linux" || exit(0) +get(ENV, "TRAVIS_JULIA_VERSION", nothing) == "1.0" || exit(0) + +using Coverage + +cd(joinpath(@__DIR__, "..", "..")) do + Codecov.submit(Codecov.process_folder()) +end +