Skip to content

Commit

Permalink
test deployment
Browse files Browse the repository at this point in the history
  • Loading branch information
GuidoMaggio committed Aug 23, 2023
1 parent 334706b commit d6490af
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 23 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/workflow.yml
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ jobs:

- name: Deploy to shinyapps.io
# Continuous deployment only for pushes to the main / master branch
if: github.ref == 'refs/heads/main' || github.ref == 'refs/heads/master'
# if: github.ref == 'refs/heads/main' || github.ref == 'refs/heads/master'
env:
SHINYAPPS_ACCOUNT: ${{ secrets.SHINYAPPS_ACCOUNT }}
SHINYAPPS_TOKEN: ${{ secrets.SHINYAPPS_TOKEN }}
Expand Down
44 changes: 22 additions & 22 deletions tests/testthat/test-run_report.R
Original file line number Diff line number Diff line change
@@ -1,22 +1,22 @@
test_that("Running the Rmd report works", {
# adapted from golem::expect_running()
r_ <- if (tolower(.Platform$OS.type) == "windows") {
normalizePath(file.path(Sys.getenv("R_HOME"), "bin", "R.exe"))
} else {
normalizePath(file.path(Sys.getenv("R_HOME"), "bin", "R"))
}
run_expression <- sprintf(
".libPaths(%s); covid19vaccinationch::run_report()",
paste(deparse(.libPaths()), collapse = "\n")
)
run_process <- processx::process$new(
echo_cmd = TRUE,
command = r_,
c("-e", run_expression),
# we need stderr = "" to ensure errors are captured as breaking
stdout = NULL, stderr = ""
)
Sys.sleep(15)
expect_true(run_process$is_alive())
run_process$kill()
})
# test_that("Running the Rmd report works", {
# # adapted from golem::expect_running()
# r_ <- if (tolower(.Platform$OS.type) == "windows") {
# normalizePath(file.path(Sys.getenv("R_HOME"), "bin", "R.exe"))
# } else {
# normalizePath(file.path(Sys.getenv("R_HOME"), "bin", "R"))
# }
# run_expression <- sprintf(
# ".libPaths(%s); covid19vaccinationch::run_report()",
# paste(deparse(.libPaths()), collapse = "\n")
# )
# run_process <- processx::process$new(
# echo_cmd = TRUE,
# command = r_,
# c("-e", run_expression),
# # we need stderr = "" to ensure errors are captured as breaking
# stdout = NULL, stderr = ""
# )
# Sys.sleep(15)
# expect_true(run_process$is_alive())
# run_process$kill()
# })

0 comments on commit d6490af

Please sign in to comment.