-
Notifications
You must be signed in to change notification settings - Fork 0
/
.Rprofile
34 lines (30 loc) · 1.32 KB
/
.Rprofile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
# ---------------------------------------------------------
# This is the .Rprofile file
#
# Use it to include any functions you want to run before any other code is run.
# For example, using renv automatically sources its activate script to the .RProfile file
# This ensures that all renv checks on package versions happens before any code is run.
#
#
# ---------------------------------------------------------
cat("Sourcing .Rprofile.", fill = TRUE)
source("renv/activate.R")
# Function to run tests
run_tests_locally <- function() {
Sys.unsetenv("http_proxy")
Sys.unsetenv("https_proxy")
source("global.r")
# message("================================================================================")
# message("== testthat ====================================================================")
# message("")
# testthat::test_dir("tests/testthat")
# message("")
message("================================================================================")
message("== shinytest2 ==================================================================")
message("")
shinytest2::test_app()
message("")
message("================================================================================")
}
# Install commit-hooks locally
statusWriteCommit <- file.copy(".hooks/pre-commit.R", ".git/hooks/pre-commit", overwrite = TRUE)