From 93e2c2b971d7c4b1b89ccdba4ffbc7606170b58e Mon Sep 17 00:00:00 2001 From: David Gustavsson Date: Thu, 8 Aug 2024 17:03:31 +0200 Subject: [PATCH] Try to fix CI --- test/runtests.jl | 2 +- test/visualregression_tests.jl | 7 +++++-- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/test/runtests.jl b/test/runtests.jl index 7729998..1006c82 100644 --- a/test/runtests.jl +++ b/test/runtests.jl @@ -6,7 +6,7 @@ using LaTeXStrings using Test # Run tests -if Sys.MACHINE == "x86_64-linux-gnu" +if Sys.islinux() @testset "visual regression tests" begin include("visualregression_tests.jl") end end @testset "macro test" begin include("macros.jl") end diff --git a/test/visualregression_tests.jl b/test/visualregression_tests.jl index f099d9c..6665a30 100644 --- a/test/visualregression_tests.jl +++ b/test/visualregression_tests.jl @@ -1,8 +1,11 @@ -using Latexify, VisualRegressionTests, Gtk +using Latexify, VisualRegressionTests +if isinteractive() + using Gtk +end function latexify_VRT(filename, args...; kwargs...) testfun(fname) = render(latexify(args...; kwargs...), MIME"image/png"(); name=replace(fname, r".png$"=>""), transparent=false) - @visualtest testfun joinpath("visualreferences", filename) + @visualtest testfun joinpath("visualreferences", filename) $(isinteractive()) end latexify_VRT("simpleequation.png", :(x^2-2y_a*exp(3)∈[1,2,3]); cdot=false)