1
0
mirror of https://github.com/msberends/AMR.git synced 2024-12-26 17:26:12 +01:00

(v1.6.0.9034) unit tests

This commit is contained in:
dr. M.S. (Matthijs) Berends 2021-05-15 22:30:11 +02:00
parent 0ce9fb4da2
commit 54dd868b22
2 changed files with 11 additions and 10 deletions

View File

@ -108,19 +108,19 @@ jobs:
run: | run: |
sudo apt install -y libssl-dev pandoc pandoc-citeproc libxml2-dev libicu-dev libcurl4-openssl-dev sudo apt install -y libssl-dev pandoc pandoc-citeproc libxml2-dev libicu-dev libcurl4-openssl-dev
- name: Update package dependencies
run: |
install.packages("data-raw/AMR_latest.tar.gz")
source("data-raw/_install_deps.R")
shell: Rscript {0}
- name: Cache R packages - name: Cache R packages
# if: runner.os != 'Windows' # if: runner.os != 'Windows'
uses: actions/cache@v1 uses: actions/cache@v1
with: with:
path: ${{ env.R_LIBS_USER }} path: ${{ env.R_LIBS_USER }}
key: ${{ matrix.config.os }}-r-${{ matrix.config.r }} # -${{ hashFiles('.github/depends.Rds') }} key: ${{ matrix.config.os }}-r-${{ matrix.config.r }}-20
restore-keys: ${{ matrix.config.os }}-r-${{ matrix.config.r }} restore-keys: ${{ matrix.config.os }}-r-${{ matrix.config.r }}-20
- name: Update AMR package dependencies
run: |
install.packages("data-raw/AMR_latest.tar.gz")
source("data-raw/_install_deps.R")
shell: Rscript {0}
- name: Session info - name: Session info
run: | run: |
@ -161,10 +161,10 @@ jobs:
R CMD check AMR --no-manual --no-vignettes R CMD check AMR --no-manual --no-vignettes
shell: bash shell: bash
- name: Show testthat output - name: Show unit tests output
if: always() if: always()
run: | run: |
find . -name 'testthat.Rout*' -exec cat '{}' \; || true find . -name 'tinytest.Rout*' -exec cat '{}' \; || true
shell: bash shell: bash
- name: Upload check results - name: Upload check results

View File

@ -25,6 +25,7 @@
# test only on GitHub Actions and at home - not on CRAN as tests are lengthy # test only on GitHub Actions and at home - not on CRAN as tests are lengthy
if (identical(Sys.getenv("R_TINYTEST"), "true")) { if (identical(Sys.getenv("R_TINYTEST"), "true")) {
print(as.data.frame(utils::installed.packages())[, "Version", drop = FALSE])
library(tinytest) library(tinytest)
library(AMR) library(AMR)
test_package("AMR") test_package("AMR")