Skip to content

Commit

Permalink
fix deps, try html as well
Browse files Browse the repository at this point in the history
  • Loading branch information
simonbyrne committed Oct 16, 2022
1 parent 9399502 commit b06f59c
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 6 deletions.
3 changes: 1 addition & 2 deletions Project.toml
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,10 @@ version = "0.1.0"
julia = "1.6"

[extras]
Plotly = "58dd65bb-95f3-509e-9936-c39a10fdeae7"
PlotlyBase = "a03496cd-edff-5a9b-9e67-9cda94a718b5"
PlotlyKaleido = "f2990250-8cf9-495f-b13a-cce12b45703c"
Plots = "91a5bcdd-55d7-5caf-9e0b-520d859cae80"
Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40"

[targets]
test = ["Test", "Plotly", "PlotlyBase", "PlotlyKaleido", "Plots"]
test = ["Test", "PlotlyBase", "PlotlyKaleido", "Plots"]
15 changes: 11 additions & 4 deletions test/runtests.jl
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,8 @@ end

using Plots

plotly()

@testset "artifact" begin
dir = mktempdir()
subdir = joinpath(dir, "extra")
Expand All @@ -39,16 +41,19 @@ using Plots
if step == "linux-latest"

@test BuildkiteUtils.artifact_search("*") == []
X = range(-2pi,2pi,length=30)
p = plot(X, sin.(X))

p = plot(identity, sin, -2pi, 2pi)
svg(p, joinpath(dir, "sin x.svg"))
savefig(p, joinpath(dir, "sin x.html"))
savefig(p, joinpath(dir, "sin x.svg"))

cd(dir) do
BuildkiteUtils.artifact_upload("*.svg")
BuildkiteUtils.artifact_upload("*.html")
BuildkiteUtils.artifact_upload("**/*.txt")
end

@test sort(BuildkiteUtils.artifact_search()) == sort(["sin x.svg", "extra/step.txt"])
@test sort(BuildkiteUtils.artifact_search()) == sort(["sin x.html", "sin x.svg", "extra/step.txt"])

newdir = mktempdir()
BuildkiteUtils.artifact_download("*.svg", newdir; step=step)
Expand All @@ -57,7 +62,7 @@ using Plots

else

@test sort(BuildkiteUtils.artifact_search(step="linux-latest")) == sort(["sin x.svg", "extra/step.txt"])
@test sort(BuildkiteUtils.artifact_search(step="linux-latest")) == sort(["sin x.html", "sin x.svg", "extra/step.txt"])
@test isempty(BuildkiteUtils.artifact_search(step=step))

cd(dir) do
Expand All @@ -83,6 +88,8 @@ end
Success!
<img src="artifact://sin x.svg" alt="sin(x)" height=250 >
<iframe src="artifact://sin x.html" title="sin(x)"></iframe>
"""; style="success", context="xtra")

elseif step == "linux-v1.6"
Expand Down

0 comments on commit b06f59c

Please sign in to comment.