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
Gabor
February 16, 2024, 11:27pm
2
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
opened 08:02AM - 11 May 20 UTC
closed 07:11AM - 08 Jun 21 UTC
On travis using r-devel as well as using current r-devel locally, many visual te… st cases generated with R 4.0.0 fail. It seems that polyline was replaced by polygon and fill: none was added. Example diff:
```
-<polyline points='41.33,168.38 338.83,168.38 338.83,41.33 41.33,41.33 41.33,168.38 ' style='stroke-width: 0.75;' />
+<polygon points='41.33,168.38 338.83,168.38 338.83,41.33 41.33,41.33 ' style='stroke-width: 0.75; fill: none;' />
```
The example test case:
https://github.com/jranke/mkin/blob/master/tests/testthat/test_nafta.R#L25
SVG as generated by R release:
https://raw.githubusercontent.com/jranke/mkin/master/tests/figs/evaluations-according-to-2015-nafta-guidance/nafta-sop-appendix-b.svg
Gabor
February 17, 2024, 9:33am
5
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
system
Closed
February 24, 2024, 9:34am
6
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.