Skip to content

Commit 957063b

Browse files
authored
test on Julia 1.6 (#7)
* add macos test as well
1 parent 69abc69 commit 957063b

File tree

3 files changed

+67
-29
lines changed

3 files changed

+67
-29
lines changed

.buildkite/pipeline.yml

Lines changed: 30 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,29 +3,55 @@ agents:
33
arch: x86_64
44

55
steps:
6-
- label: ":linux:"
7-
key: "linux"
6+
- label: ":linux: latest"
7+
key: "linux-latest"
88
plugins:
99
- JuliaCI/julia#v1:
1010
version: "1"
1111
- JuliaCI/julia-test#v1:
1212
coverage: false
13-
timeout_in_minutes: 60
13+
timeout_in_minutes: 15
1414
# Don't run Buildkite if the commit message includes the text [skip tests]
1515
if: build.message !~ /\[skip tests\]/
1616
agents:
1717
os: linux
1818

1919
- wait
2020

21+
- label: ":linux: v1.6"
22+
key: "linux-min"
23+
plugins:
24+
- JuliaCI/julia#v1:
25+
version: "1.6"
26+
- JuliaCI/julia-test#v1:
27+
coverage: false
28+
timeout_in_minutes: 15
29+
# Don't run Buildkite if the commit message includes the text [skip tests]
30+
if: build.message !~ /\[skip tests\]/
31+
agents:
32+
os: linux
33+
34+
- label: ":macos:"
35+
key: "macos"
36+
plugins:
37+
- JuliaCI/julia#v1:
38+
version: "1"
39+
- JuliaCI/julia-test#v1:
40+
coverage: false
41+
timeout_in_minutes: 15
42+
# Don't run Buildkite if the commit message includes the text [skip tests]
43+
if: build.message !~ /\[skip tests\]/
44+
agents:
45+
os: macos
46+
2147
- label: ":windows:"
2248
key: "windows"
2349
plugins:
2450
- JuliaCI/julia#v1:
2551
version: "1"
2652
- JuliaCI/julia-test#v1:
2753
coverage: false
28-
timeout_in_minutes: 60
54+
timeout_in_minutes: 15
2955
# Don't run Buildkite if the commit message includes the text [skip tests]
3056
if: build.message !~ /\[skip tests\]/
3157
agents:

Project.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40"
88
Plots = "91a5bcdd-55d7-5caf-9e0b-520d859cae80"
99

1010
[compat]
11-
Plots = "=1.33"
11+
julia = "1.6"
1212

1313
[targets]
1414
test = ["Test", "Plots"]

test/runtests.jl

Lines changed: 36 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -5,21 +5,27 @@ step = ENV["BUILDKITE_STEP_KEY"]
55
@test success(`$(BuildkiteUtils.agent()) --version`)
66

77
@testset "meta-data" begin
8-
if step == "linux"
8+
if step == "linux-latest"
99
@test keys(BuildkiteUtils.METADATA) == []
10-
elseif step == "windows"
11-
@test keys(BuildkiteUtils.METADATA) == ["aa-linux"]
12-
@test BuildkiteUtils.METADATA["aa-linux"] == "hello"
10+
@test !haskey(BuildkiteUtils.METADATA, "test-linux-latest")
11+
else
12+
@test "test-linux-latest" in keys(BuildkiteUtils.METADATA)
13+
@test haskey(BuildkiteUtils.METADATA, "test-linux-latest")
14+
@test BuildkiteUtils.METADATA["test-linux-latest"] == "hello"
1315
end
1416

15-
BuildkiteUtils.METADATA["aa-$step"] = "hello"
17+
BuildkiteUtils.METADATA["test-$step"] = "hello"
1618

17-
if step == "linux"
18-
@test keys(BuildkiteUtils.METADATA) == ["aa-linux"]
19-
elseif step == "windows"
20-
@test keys(BuildkiteUtils.METADATA) == ["aa-linux", "aa-windows"]
19+
if step == "linux-latest"
20+
@test keys(BuildkiteUtils.METADATA) == ["test-linux-latest"]
21+
@test haskey(BuildkiteUtils.METADATA, "test-linux-latest")
22+
else
23+
@test haskey(BuildkiteUtils.METADATA, "test-linux-latest")
24+
@test haskey(BuildkiteUtils.METADATA, "test-$step")
25+
@test "test-$step" in keys(BuildkiteUtils.METADATA)
2126
end
22-
@test BuildkiteUtils.METADATA["aa-$step"] == "hello"
27+
28+
@test BuildkiteUtils.METADATA["test-$step"] == "hello"
2329
end
2430

2531
using Plots
@@ -28,9 +34,9 @@ using Plots
2834
dir = mktempdir()
2935
subdir = joinpath(dir, "extra")
3036
mkpath(subdir)
31-
write(joinpath(subdir, "$step.txt"), "hello world")
37+
write(joinpath(subdir, "step.txt"), step)
3238

33-
if step == "linux"
39+
if step == "linux-latest"
3440

3541
@test BuildkiteUtils.artifact_search("*") == []
3642

@@ -42,42 +48,48 @@ using Plots
4248
BuildkiteUtils.artifact_upload("**/*.txt")
4349
end
4450

45-
@test sort(BuildkiteUtils.artifact_search()) == sort(["sin x.png", "extra/linux.txt"])
51+
@test sort(BuildkiteUtils.artifact_search()) == sort(["sin x.png", "extra/step.txt"])
4652

4753
newdir = mktempdir()
4854
BuildkiteUtils.artifact_download("*.png", newdir; step=step)
4955
@test readdir(newdir) == ["sin x.png"]
5056
@test read(joinpath(dir, "sin x.png")) == read(joinpath(newdir, "sin x.png"))
5157

52-
elseif step == "windows"
58+
else
5359

54-
@test sort(BuildkiteUtils.artifact_search()) == sort(["sin x.png", "extra/linux.txt"])
60+
@test sort(BuildkiteUtils.artifact_search(step="linux-latest")) == sort(["sin x.png", "extra/step.txt"])
61+
@test isempty(BuildkiteUtils.artifact_search(step=step))
5562

5663
cd(dir) do
5764
BuildkiteUtils.artifact_upload("**/*.txt")
5865
end
5966

60-
@test sort(BuildkiteUtils.artifact_search()) == sort(["sin x.png", "extra/linux.txt", "extra\\windows.txt"])
61-
@test sort(BuildkiteUtils.artifact_search(; step="linux")) == sort(["sin x.png", "extra/linux.txt"])
62-
@test sort(BuildkiteUtils.artifact_search(; step="windows")) == sort(["extra\\windows.txt"])
67+
if step == "windows"
68+
@test BuildkiteUtils.artifact_search(step=step) == ["extra\\step.txt"]
69+
else
70+
@test BuildkiteUtils.artifact_search(step=step) == ["extra/step.txt"]
71+
end
6372

6473
newdir = mktempdir()
65-
BuildkiteUtils.artifact_download("*.png", newdir; step="linux")
74+
BuildkiteUtils.artifact_download("*.png", newdir; step="linux-latest")
6675
@test readdir(newdir) == ["sin x.png"]
6776
end
6877
end
6978

7079
@testset "annotation" begin
71-
if step == "linux"
72-
BuildkiteUtils.annotate("Hello from :linux:\n")
80+
if step == "linux-latest"
81+
BuildkiteUtils.annotate("Hello from :linux:\n\n")
7382
BuildkiteUtils.annotate("""
74-
Success
83+
Success!
7584
7685
<img src="artifact://sin x.png" alt="sin(x)" height=250 >
7786
"""; style="success", context="xtra")
7887

88+
elseif step == "linux-v1.6"
89+
BuildkiteUtils.annotate("and from :linux: v1.6\n\n"; append=true)
7990
elseif step == "windows"
80-
BuildkiteUtils.annotate("and from :windows:\n"; append=true)
81-
91+
BuildkiteUtils.annotate("and from :windows:\n\n"; append=true)
92+
elseif step == "macos"
93+
BuildkiteUtils.annotate("and from :macos:\n\n"; append=true)
8294
end
8395
end

0 commit comments

Comments
 (0)