Skip to content

Commit

Permalink
skip tests that call rmarkdown on CRAN, which requires newer pandoc (#…
Browse files Browse the repository at this point in the history
…975)

* skip tests that call rmarkdown on CRAN, which requires newer pandoc

The R macOS checks started failing because the available pandoc was older than
1.12.3, which prevented the publication of rsconnect 1.0.2.

* bread-crumb the pandoc test skips
  • Loading branch information
aronatkins authored Aug 23, 2023
1 parent f97ca94 commit 8b3b8a0
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 2 deletions.
4 changes: 2 additions & 2 deletions cran-comments.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
## Summary

* Address CRAN-observed test failures caused by problems with some
Bioconductor mirrors.
* Address CRAN-observed test failures caused by too-low Pandoc versions on
some CRAN hosts.
* Addresses a couple issues encountered by users with the previous release.

## R CMD check results
Expand Down
2 changes: 2 additions & 0 deletions tests/testthat/test-deployApp.R
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,14 @@ test_that("appDir must be an existing directory", {
})

test_that("single document appDir is deprecated", {
skip_on_cran()
expect_snapshot(error = TRUE, {
deployApp("foo.Rmd")
})
})

test_that("appPrimaryDoc must exist, if supplied", {
skip_on_cran()
dir <- local_temp_app()

expect_snapshot(error = TRUE, {
Expand Down
11 changes: 11 additions & 0 deletions tests/testthat/test-deployDoc.R
Original file line number Diff line number Diff line change
@@ -1,10 +1,12 @@
test_that("deployDoc correctly reports bad path", {
skip_on_cran()
expect_snapshot(deployDoc("doesntexist.Rmd"), error = TRUE)
})

# standardizeSingleDocDeployment ------------------------------------------

test_that("turns appDir into appDir + appPrimarySourceDoc", {
skip_on_cran()
dir <- local_temp_app(list("foo.R" = ""))

doc <- standardizeSingleDocDeployment(file.path(dir, "foo.R"))
Expand All @@ -13,6 +15,7 @@ test_that("turns appDir into appDir + appPrimarySourceDoc", {
})

test_that("shiny rmd deploys whole directory", {
skip_on_cran()
dir <- local_temp_app(list("foo.Rmd" = c(
"---",
"runtime: shiny",
Expand All @@ -23,6 +26,7 @@ test_that("shiny rmd deploys whole directory", {
})

test_that("regular rmd deploys file and dependencies", {
skip_on_cran()
dir <- local_temp_app(list(
"foo.Rmd" = c(
"---",
Expand All @@ -37,6 +41,7 @@ test_that("regular rmd deploys file and dependencies", {
})

test_that("regular rmd deploys .Rprofile, if present", {
skip_on_cran()
dir <- local_temp_app(list(
"foo.Rmd" = "",
".Rprofile" = ""
Expand All @@ -47,6 +52,7 @@ test_that("regular rmd deploys .Rprofile, if present", {
})

test_that("regular rmd deploys requirements.txt, if present", {
skip_on_cran()
dir <- local_temp_app(list(
"foo.Rmd" = "",
"requirements.txt" = ""
Expand All @@ -57,6 +63,7 @@ test_that("regular rmd deploys requirements.txt, if present", {
})

test_that("regular rmd deploys renv.lock, if present", {
skip_on_cran()
dir <- local_temp_app(list(
"foo.Rmd" = "",
"renv.lock" = ""
Expand All @@ -67,6 +74,7 @@ test_that("regular rmd deploys renv.lock, if present", {
})

test_that("regular html does not deploy .Rprofile", {
skip_on_cran()
dir <- local_temp_app(list(
"foo.html" = "",
".Rprofile" = ""
Expand All @@ -77,6 +85,7 @@ test_that("regular html does not deploy .Rprofile", {
})

test_that("regular html does not deploy requirements.txt", {
skip_on_cran()
dir <- local_temp_app(list(
"foo.html" = "",
"requirements.txt" = ""
Expand All @@ -87,6 +96,7 @@ test_that("regular html does not deploy requirements.txt", {
})

test_that("regular html does not deploy renv.lock", {
skip_on_cran()
dir <- local_temp_app(list(
"foo.html" = "",
"renv.lock" = ""
Expand All @@ -97,6 +107,7 @@ test_that("regular html does not deploy renv.lock", {
})

test_that("other types deploy that one file", {
skip_on_cran()
dir <- local_temp_app(list("foo.R" = ""))
doc <- standardizeSingleDocDeployment(file.path(dir, "foo.R"))
expect_equal(doc$appFiles, "foo.R")
Expand Down

0 comments on commit 8b3b8a0

Please sign in to comment.