Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .github/workflows/r_ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ jobs:
steps:
- uses: actions/checkout@v2
- name: Set up R ${{ matrix.r-version }}
uses: r-lib/actions/setup-r@ffe45a39586f073cc2e9af79c4ba563b657dc6e3
uses: r-lib/actions/setup-r@v1
with:
r-version: ${{ matrix.r-version }}
- name: Install libcurl
Expand All @@ -36,7 +36,7 @@ jobs:
uses: actions/cache@v2
with:
path: ${{ env.R_LIBS_USER }}
key: ${{ runner.os }}-r-1-
key: ${{ runner.os }}-r-2-
- name: Install dependencies
run: |
install.packages(c("remotes", "rcmdcheck"))
Expand Down
6 changes: 6 additions & 0 deletions R-packages/covidcast/tests/testthat/setup-options.R
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
# Many tests use hand-made reference data frames. In R < 4.0, columns like
# `geo_values` and `data_source`, containing strings, are interpreted as
# factors. To prevent us from having to set stringsAsFactors = FALSE in every
# test case, set the option while saving the default to restore in the teardown
# (in teardown-options.R).
.defaultStringsAsFactors <- options(stringsAsFactors = FALSE)
2 changes: 2 additions & 0 deletions R-packages/covidcast/tests/testthat/teardown-options.R
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
# see setup-options.R
options(stringsAsFactors = .defaultStringsAsFactors)