Skip to content

Commit

Permalink
upload image
Browse files Browse the repository at this point in the history
  • Loading branch information
penelopeysm committed Aug 23, 2024
1 parent 9ffdf5f commit 87f83d3
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 1 deletion.
5 changes: 5 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -120,6 +120,11 @@ jobs:
with:
prefix: ${{ matrix.prefix }} # for `xvfb-run`

- uses: actions/upload-artifact@v4
with:
name: gr_6_${{ matrix.os }}_${{ matrix.version }}
path: gr_6.png

- name: Run downstream tests
if: startsWith(matrix.os, 'ubuntu')
shell: xvfb-run julia --project=@. --color=yes {0}
Expand Down
7 changes: 6 additions & 1 deletion test/test_backends.jl
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,11 @@ function reference_file(backend, version, i)
return reffn
end

# Monkey patch so that we can save the plot to a known file
function VisualTest2(testFunction::Function, refFilename::AbstractString, args...; kw...)
VisualTest("gr_6.png", testFunction, args, kw, refFilename)
end

function image_comparison_tests(
pkg::Symbol,
idx::Int;
Expand Down Expand Up @@ -97,7 +102,7 @@ function image_comparison_tests(

func = fn -> Base.eval.(Ref(TESTS_MODULE), (imports, exprs, :(png($fn))))
test_images(
VisualTest(func, reffn),
VisualTest2(func, reffn),
newfn = newfn,
popup = popup,
sigma = sigma,
Expand Down

0 comments on commit 87f83d3

Please sign in to comment.