Skip to content

Commit

Permalink
Make testthat usage conditional on R>=4.0
Browse files Browse the repository at this point in the history
 - skip loading testthat on R 3.6
 - waldo dependency requires R>=4.0
  • Loading branch information
brownag committed Dec 16, 2024
1 parent df86224 commit 2d6b125
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/R-CMD-check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ jobs:

- uses: r-lib/actions/setup-r-dependencies@v2
with:
extra-packages: any::rcmdcheck, any::remotes, terra=?ignore-before-r=4.1.0, knitr=?ignore-before-r=4.0.0, rmarkdown=?ignore-before-r=4.0.0, RSQLite=?ignore-before-r=4.0.0, local::., brownag/soilDBdata
extra-packages: any::rcmdcheck, any::remotes, terra=?ignore-before-r=4.1.0, knitr=?ignore-before-r=4.0.0, rmarkdown=?ignore-before-r=4.0.0, RSQLite=?ignore-before-r=4.0.0, testthat=?ignore-before-r=4.0.0, local::., brownag/soilDBdata
# upgrade: 'TRUE' ## NB: required to force building of source packages
cache: false
needs: check
Expand Down
8 changes: 5 additions & 3 deletions tests/testthat.R
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
library(testthat)
library(soilDB)
if (as.integer(R.Version()$major) >= 4) {
library(testthat)
library(soilDB)

test_check("soilDB")
test_check("soilDB")
}

0 comments on commit 2d6b125

Please sign in to comment.