fix: ship the vignettes
.Rbuildignore excluded ^vignettes$, ^doc$ and ^Meta$, so an installed
uscogdata had no vignettes at all -- while the README instructed users to
run vignette("total-spending"), which failed for every one of them.
Both build offline: total-spending points USCOGDATA_URL at the bundled
fixture, population-denominators is eval = FALSE. Confirmed present in the
built tarball as both source and rendered inst/doc/.
The test also pins the fixture as never-excluded -- it is what lets
R CMD check run with no credentials on r-universe and GitHub Actions.
This commit is contained in:
@@ -9,11 +9,8 @@
|
||||
^\.git$
|
||||
^\.gitignore$
|
||||
\.gitkeep$
|
||||
^vignettes$
|
||||
^specs$
|
||||
^plans$
|
||||
^doc$
|
||||
^Meta$
|
||||
^\.gitea$
|
||||
^CLAUDE\.md$
|
||||
^\.superpowers$
|
||||
|
||||
@@ -122,3 +122,12 @@ test_that("LICENSE and LICENSE.md name the same copyright holder", {
|
||||
# LICENSE alone, which is how the two came to disagree in the first place.
|
||||
expect_match(full, "MIT License", fixed = TRUE)
|
||||
})
|
||||
|
||||
test_that("vignettes are not excluded from the build", {
|
||||
skip_if_no_source_tree(".Rbuildignore")
|
||||
ignore <- readLines(source_tree_path(".Rbuildignore"), warn = FALSE)
|
||||
expect_false(any(grepl("^\\^vignettes\\$$", ignore)))
|
||||
# The fixture is what lets R CMD check run offline with no credentials on
|
||||
# r-universe and GitHub Actions. It must never be excluded.
|
||||
expect_false(any(grepl("fixture_corpus", ignore, fixed = TRUE)))
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user