Skip to content

Commit

Permalink
Add R-CMD-check workflow for R 4.1 (#405)
Browse files Browse the repository at this point in the history
* add R-CMD-check workflow for R 4.0

* fix typo in R-CMD-check.yaml

* skip print tests on R < 4.2.0 due to change in tools::Rd2txt
  • Loading branch information
joshwlambert authored Oct 22, 2024
1 parent 058acc2 commit 7bbb3f8
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
1 change: 1 addition & 0 deletions .github/workflows/R-CMD-check.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,7 @@ jobs:
- {os: ubuntu-latest, r: 'devel', http-user-agent: 'release'}
- {os: ubuntu-latest, r: 'release'}
- {os: ubuntu-latest, r: 'oldrel-1'}
- {os: ubuntu-latest, r: '4.1'}

env:
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}
Expand Down
7 changes: 6 additions & 1 deletion tests/testthat/test-print.R
Original file line number Diff line number Diff line change
@@ -1,9 +1,14 @@
# tests are skipped when R version < 4.2.0 due to a change in base tools::Rd2txt()
# https://github.com/r-devel/r-svn/commit/aaabe42cc32582db77ba275233def72b11e32e45

test_that("epiparameter_db print method works as expected for > 5 <epiparameter>", {
skip_if(getRversion() < "4.2.0")
expect_snapshot(epiparameter_db())
})

test_that("epiparameter_db print method works as expected for <= 5 <epiparameter>", {
skip_if(getRversion() < "4.2.0")
expect_snapshot(
epiparameter_db(disease = "SARS", epi_name = "offspring distribution")
)
})
})

0 comments on commit 7bbb3f8

Please sign in to comment.