@@ -14,6 +14,11 @@ warn_ticks = :warn, "No strict ticks found"
14
14
const C = RGBA{Float64}
15
15
const C0 = RGBA{PlotUtils. Colors. N0f8}
16
16
17
+ bool_env (x, default:: String = " 0" ):: Bool = tryparse (Bool, get (ENV , x, default))
18
+
19
+ is_ci () = bool_env (" CI" )
20
+ is_64b () = Sys. WORD_SIZE == 64
21
+
17
22
@testset " colors" begin
18
23
@test plot_color (nothing ) == C (0 , 0 , 0 , 0 )
19
24
@test plot_color (false ) == C (0 , 0 , 0 , 0 )
120
125
@test optimize_ticks (- 1 , 2 ) == ([- 1.0 , 0.0 , 1.0 , 2.0 ], - 1.0 , 2.0 )
121
126
122
127
# check if ticks still generate if max - min << abs(min) (i.e. for Float64 ranges)
123
- @test optimize_ticks (1e11 - 1 , 1e11 + 2 ) == (1e11 .+ (- 1 : 2 ), 1e11 - 1.0 , 1e11 + 2.0 )
128
+ is_64b () &&
129
+ @test optimize_ticks (1e11 - 1 , 1e11 + 2 ) == (1e11 .+ (- 1 : 2 ), 1e11 - 1.0 , 1e11 + 2.0 )
124
130
125
131
@testset " dates" begin
126
132
dt1, dt2 = Dates. value (DateTime (2000 )), Dates. value (DateTime (2100 ))
158
164
159
165
@testset " digits" begin
160
166
@testset " digits $((10 ^ n) - 1 ) *10^$i " for n ∈ 1 : 9 , i ∈ - 9 : 9
167
+ (! is_64b () && n ≥ 9 ) && continue
161
168
y0 = 10 ^ n
162
169
x0 = y0 - 1
163
170
x, y = (x0, y0) .* 10.0 ^ i
314
321
@test stats. time < 1e-3 # ~ 0.22ms (on 1.9)
315
322
end
316
323
317
- if Sys. islinux () && VERSION ≥ v " 1.9.0" && isempty (VERSION . prerelease) # avoid running on `nightly`
324
+ if (
325
+ Sys. islinux () &&
326
+ VERSION ≥ v " 1.11.0" &&
327
+ isempty (VERSION . prerelease) && # avoid running on `nightly`
328
+ is_64b () &&
329
+ (
330
+ ! is_ci () ||
331
+ (is_ci () && get (ENV , " GITHUB_EVENT_NAME" , " pull_request" ) == " pull_request" )
332
+ )
333
+ )
318
334
@testset " downstream" begin
319
335
include (" downstream.jl" )
320
336
end
0 commit comments