1
0
mirror of https://github.com/msberends/AMR.git synced 2025-07-09 13:42:04 +02:00

(v1.6.0.9031) tinytest unit tests

This commit is contained in:
2021-05-15 21:36:22 +02:00
parent 9a381c8d18
commit d8c91d5876
71 changed files with 2671 additions and 2901 deletions

View File

@ -81,7 +81,7 @@ jobs:
- {os: ubuntu-16.04, r: '3.2', allowfail: true, rspm: "https://packagemanager.rstudio.com/cran/__linux__/xenial/latest"}
- {os: ubuntu-16.04, r: '3.1', allowfail: true, rspm: "https://packagemanager.rstudio.com/cran/__linux__/xenial/latest"}
- {os: ubuntu-16.04, r: '3.0', allowfail: false, rspm: "https://packagemanager.rstudio.com/cran/__linux__/xenial/latest"}
env:
R_REMOTES_NO_ERRORS_FROM_WARNINGS: true
RSPM: ${{ matrix.config.rspm }}
@ -93,29 +93,14 @@ jobs:
with:
r-version: ${{ matrix.config.r }}
- uses: r-lib/actions/setup-pandoc@master
# - uses: r-lib/actions/setup-pandoc@master
- name: Install remotes package
if: matrix.config.r != '3.0'
run: |
install.packages('remotes')
shell: Rscript {0}
- name: Query dependencies
if: matrix.config.r != '3.0'
run: |
saveRDS(remotes::dev_package_deps(dependencies = TRUE), ".github/depends.Rds", version = 2)
shell: Rscript {0}
# - name: Query dependencies
# if: matrix.config.r != '3.0'
# run: |
# saveRDS(remotes::dev_package_deps(dependencies = TRUE), ".github/depends.Rds", version = 2)
# shell: Rscript {0}
- name: Cache R packages
if: runner.os != 'Windows' && matrix.config.r != '3.0'
# && matrix.config.r != '3.0' && matrix.config.r != '3.1' && matrix.config.r != '3.2'
uses: actions/cache@v1
with:
path: ${{ env.R_LIBS_USER }}
key: ${{ matrix.config.os }}-r-${{ matrix.config.r }}-3-${{ hashFiles('.github/depends.Rds') }}
restore-keys: ${{ matrix.config.os }}-r-${{ matrix.config.r }}-3-
- name: Install Linux dependencies
if: runner.os == 'Linux'
# update the below with sysreqs::sysreqs("DESCRIPTION") and check the "DEB" entries (for Ubuntu).
@ -123,11 +108,18 @@ jobs:
run: |
sudo apt install -y libssl-dev pandoc pandoc-citeproc libxml2-dev libicu-dev libcurl4-openssl-dev
- name: Update package dependencies using remotes package
if: matrix.config.r != '3.0'
- name: Update package dependencies
run: |
remotes::install_deps(dependencies = TRUE)
source("data-raw/_install_deps.R")
shell: Rscript {0}
- name: Cache R packages
# if: runner.os != 'Windows'
uses: actions/cache@v1
with:
path: ${{ env.R_LIBS_USER }}
key: ${{ matrix.config.os }}-r-${{ matrix.config.r }} # -${{ hashFiles('.github/depends.Rds') }}
restore-keys: ${{ matrix.config.os }}-r-${{ matrix.config.r }}
- name: Session info
run: |
@ -145,12 +137,13 @@ jobs:
_R_CHECK_LENGTH_1_CONDITION_: verbose
_R_CHECK_LENGTH_1_LOGIC2_: verbose
R_LIBS_USER: ${{ env.R_LIBS_USER }}
R_TINYTEST: true
run: |
tar -xf data-raw/AMR_latest.tar.gz
rm -rf AMR/vignettes
R CMD check AMR
shell: bash
- name: Run R CMD check on Linux and macOS
if: runner.os != 'Windows'
env:
@ -160,6 +153,7 @@ jobs:
_R_CHECK_LENGTH_1_CONDITION_: verbose
_R_CHECK_LENGTH_1_LOGIC2_: verbose
R_LIBS_USER: ${{ env.R_LIBS_USER }}
R_TINYTEST: true
run: |
tar -xf data-raw/AMR_latest.tar.gz
rm -rf AMR/vignettes