Nothing
test_that("cff_gha_update installs a workflow in the requested package", {
skip_on_cran()
new_dir <- local_mock_package(
description = "DESCRIPTION_many_urls",
rbuildignore = TRUE,
local_dir = FALSE
)
rbuildignore <- file.path(new_dir, ".Rbuildignore")
expect_true(file.exists(rbuildignore))
# Add action
expect_message(cff_gha_update(path = new_dir), "Creating directory")
expect_message(cff_gha_update(path = new_dir), "already exists")
expect_message(
cff_gha_update(path = new_dir, overwrite = TRUE),
"Workflow installed"
)
expect_true(file.exists(file.path(
new_dir,
".github",
"workflows",
"update-citation-cff.yaml"
)))
expect_true("^\\.github$" %in% readLines(rbuildignore))
})
test_that("cff_gha_update errors when workflow copy fails", {
skip_on_cran()
new_dir <- local_mock_package(
description = "DESCRIPTION_many_urls",
rbuildignore = TRUE,
local_dir = FALSE
)
local_mocked_bindings(cff_copy_workflow = function(from, to, overwrite) FALSE)
expect_snapshot(
cff_gha_update(path = new_dir),
error = TRUE,
transform = \(lines) gsub(new_dir, "<package>", lines, fixed = TRUE)
)
})
Any scripts or data that you put into this service are public.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.