github actions check failing for mac/linux after adding visual tests

I've just added some tests with testthat into my R package.

The devtools::check passes on my windows laptop. But then when I pushed to main, the pkgdown website fails with macos and ubuntu.

I'm just getting started with testing, so a novice at this. I've just added github actions in.

I think this error might relate to this. Not sure where you are supposed to put these lines of code?

Any ideas about how to make this work? If I can't get the website to update, then I'll need to remove the tests, which would be annoying...

1 Like

That does not seem to have anything to do with pkgdown. Maybe your snapshots are platform dependent? I.e. I think you can't assume that the same exact .svg file is generated on all platforms.

1 Like

It fails the checks after I added a bunch of visual tests of ggplot2 images using the vdiffr package.

So this is likely related to the source of the errors on mac and ubuntu.

Any ideas of how I can make this work, @Gabor?

Added skip_if(getRversion() < 4.1) before the vdiffr tests, and that fixed it

You don't need to run the tests to build the pkgdown site, so I don't see why that is the case.

1 Like

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.

If you have a query related to it or one of the replies, start a new topic and refer back with a link.