diff --git a/.github/workflows/r-ci.yml b/.github/workflows/r-ci.yml index 05a9c0596..b9844f10c 100644 --- a/.github/workflows/r-ci.yml +++ b/.github/workflows/r-ci.yml @@ -48,10 +48,14 @@ jobs: ${{ runner.os }}-r-facebook-survey- - name: Install R dependencies run: | + if ( packageVersion("readr") != "1.4.0" ) { + install.packages("devtools") + devtools::install_version("readr", version = "1.4.0") + } install.packages("remotes") remotes::update_packages(c("rcmdcheck", "mockr"), upgrade="always") dependency_list <- remotes::dev_package_deps(dependencies=TRUE) - remotes::update_packages(dependency_list$package, upgrade="always") + remotes::update_packages(dependency_list$package[dependency_list$package != "readr"], upgrade="always") shell: Rscript {0} - name: Check run: | diff --git a/facebook/delphiFacebook/unit-tests/testthat/test-contingency-utils.R b/facebook/delphiFacebook/unit-tests/testthat/test-contingency-utils.R index 165017dc9..e570dd142 100644 --- a/facebook/delphiFacebook/unit-tests/testthat/test-contingency-utils.R +++ b/facebook/delphiFacebook/unit-tests/testthat/test-contingency-utils.R @@ -53,7 +53,7 @@ test_that("testing get_filenames_in_range command", { create_dir_not_exist(tdir) for (filename in files) { - write_csv(data.frame(), path = file.path(tdir, filename)) + write_csv(data.frame(), file.path(tdir, filename)) } params <- list( diff --git a/facebook/delphiFacebook/unit-tests/testthat/test-contingency-variables.R b/facebook/delphiFacebook/unit-tests/testthat/test-contingency-variables.R deleted file mode 100644 index 8561fe7c6..000000000 --- a/facebook/delphiFacebook/unit-tests/testthat/test-contingency-variables.R +++ /dev/null @@ -1,4 +0,0 @@ -library(data.table) -library(tibble) - -context("Testing response recoding and renaming") diff --git a/facebook/delphiFacebook/unit-tests/testthat/test-utils.R b/facebook/delphiFacebook/unit-tests/testthat/test-utils.R index 9ae35ff00..082b8918d 100644 --- a/facebook/delphiFacebook/unit-tests/testthat/test-utils.R +++ b/facebook/delphiFacebook/unit-tests/testthat/test-utils.R @@ -24,7 +24,7 @@ test_that("testing create dir function", { test_that("testing read params when missing file", { - # expect error if missing file, since no template in test dir + # expect error if missing file, since no template in test dir tdir <- tempfile() expect_warning(expect_error(read_params(tdir))) })