Skip to content
This repository has been archived by the owner on Dec 16, 2021. It is now read-only.

Commit

Permalink
fix and upgrade tests
Browse files Browse the repository at this point in the history
  • Loading branch information
SimonDanisch committed Feb 13, 2019
1 parent 5122f4e commit 0eb9ab1
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 7 deletions.
12 changes: 6 additions & 6 deletions docs/make.jl
Original file line number Diff line number Diff line change
Expand Up @@ -155,28 +155,28 @@ makedocs(
)

using Conda, Documenter
using Base64
# deploy
ENV["DOCUMENTER_DEBUG"] = "true"
if !haskey(ENV, "DOCUMENTER_KEY")
# Workaround for when deploying locally and silly Windows truncating the env variable
# on the CI these should be set!
ENV["TRAVIS_BRANCH"] = "latest"
ENV["TRAVIS_PULL_REQUEST"] = "false"
ENV["TRAVIS_REPO_SLUG"] = "github.com/JuliaPlots/Makie.jl.git"
ENV["TRAVIS_REPO_SLUG"] = "github.com/JuliaPlots/MakieGallery.jl.git"
ENV["TRAVIS_TAG"] = "v1.0.0"
ENV["TRAVIS_OS_NAME"] = ""
ENV["TRAVIS_JULIA_VERSION"] = ""
ENV["PATH"] = string(ENV["PATH"], Sys.iswindows() ? ";" : ":", Conda.SCRIPTDIR)
ENV["DOCUMENTER_KEY"] = open(x->String(read(x)), joinpath(homedir(), "documenter.key"))
ENV["DOCUMENTER_KEY"] = readchomp(joinpath(homedir(), "documenter.key"))
end



run(`pip install --upgrade pip`)

pwd()
cd(@__DIR__)
deploydocs(
deps = Deps.pip("mkdocs", "python-markdown-math", "mkdocs-cinder"),
repo = "github.com/JuliaPlots/Makie.jl.git",
repo = "github.com/JuliaPlots/MakieGallery.jl.git",
devbranch = "master",
target = "build",
make = nothing
Expand Down
4 changes: 4 additions & 0 deletions examples/short_tests.jl
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,10 @@
@cell lines(rand(10), rand(10), color = rand(RGBAf0, 10), linewidth = 10)
@cell meshscatter(rand(10), rand(10), rand(10), color = rand(10))
@cell meshscatter(rand(10), rand(10), rand(10), color = rand(RGBAf0, 10))
@cell scatter(0..1, rand(10), markersize = rand(10) .* 0.1)
@cell scatter(LinRange(0, 1, 10), rand(10))
@cell scatter(rand(10), LinRange(0, 1, 10))


@cell begin
scene = Scene()
Expand Down
4 changes: 4 additions & 0 deletions examples/statsmakie.jl
Original file line number Diff line number Diff line change
Expand Up @@ -85,5 +85,9 @@
:SepalLength, (:PetalLength, :PetalWidth)
)
@substep

barplot(["hi", "ima", "string"], rand(3))
@substep

end
end
5 changes: 4 additions & 1 deletion src/testruns.jl
Original file line number Diff line number Diff line change
@@ -1,14 +1,15 @@
"""
Downloads the reference images from ReferenceImages for a specific version
"""
function download_reference(version = v"0.1.0")
function download_reference(version = v"0.1.1")
download_dir = joinpath(@__DIR__, "..", "test", "testimages")
tarfile = joinpath(download_dir, "gallery.zip")
url = "https://github.com/SimonDanisch/ReferenceImages/archive/v$(version).tar.gz"
refpath = joinpath(download_dir, "ReferenceImages-$(version)", "gallery")
if !isdir(refpath) # if not yet downloaded
download_images() = download(url, tarfile)
try
@info "downloading reference images for version $version"
download_images()
catch e
if isa(e, ErrorException) && occursin("Hash Mismatch", e.msg)
Expand All @@ -23,6 +24,8 @@ function download_reference(version = v"0.1.0")
if !isdir(refpath)
error("Something went wrong while downloading reference images. Plots can't be compared to references")
end
else
@info "using reference images for version $version (already downloaded)"
end
refpath
end
Expand Down

0 comments on commit 0eb9ab1

Please sign in to comment.