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

(v1.7.1.9000) ab_class update, unit tests

This commit is contained in:
2021-06-04 21:07:55 +02:00
parent 7e70403efb
commit 1908e7cc7a
34 changed files with 365 additions and 1368 deletions

View File

@ -32,9 +32,9 @@ on:
branches:
- master
schedule:
# run a schedule everyday at 3 AM.
# run a schedule everyday at 1 AM.
# this is to check that all dependencies are still available (see R/zzz.R)
- cron: '0 3 * * *'
- cron: '0 1 * * *'
name: R-code-check
@ -98,8 +98,7 @@ jobs:
- name: Restore cached R packages
# this step will add the step 'Post Restore cached R packages' on a succesful run
if: runner.os != 'Windows'
uses: actions/cache@v1
uses: actions/cache@v2
with:
path: ${{ env.R_LIBS_USER }}
key: ${{ matrix.config.os }}-r-${{ matrix.config.r }}-v4

View File

@ -50,7 +50,7 @@ jobs:
- name: Restore cached R packages
# this step will add the step 'Post Restore cached R packages' on a succesful run
uses: actions/cache@v1
uses: actions/cache@v2
with:
path: ${{ env.R_LIBS_USER }}
key: macOS-latest-r-release-v5-codecovr
@ -68,20 +68,6 @@ jobs:
as.data.frame(utils::installed.packages())[, "Version", drop = FALSE]
shell: Rscript {0}
# - name: Test coverage
# env:
# CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
# run: |
# library(AMR)
# library(tinytest)
# library(covr)
# source_files <- list.files("R", pattern = ".R$", full.names = TRUE)
# test_files <- list.files("inst/tinytest", full.names = TRUE)
# cov <- file_coverage(source_files = source_files, test_files = test_files, parent_env = asNamespace("AMR"), line_exclusions = list("R/atc_online.R", "R/mo_source.R", "R/translate.R", "R/resistance_predict.R", "R/aa_helper_functions.R", "R/aa_helper_pm_functions.R", "R/zzz.R"))
# attr(cov, which = "package") <- list(path = ".") # until https://github.com/r-lib/covr/issues/478 is solved
# codecov(coverage = cov, quiet = FALSE)
# shell: Rscript {0}
- name: Test coverage
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
@ -89,5 +75,6 @@ jobs:
run: |
library(AMR)
library(tinytest)
covr::codecov(line_exclusions = list("R/atc_online.R", "R/mo_source.R", "R/translate.R", "R/resistance_predict.R", "R/aa_helper_functions.R", "R/aa_helper_pm_functions.R", "R/zzz.R"))
x <- covr::codecov(line_exclusions = list("R/atc_online.R", "R/mo_source.R", "R/translate.R", "R/resistance_predict.R", "R/aa_helper_functions.R", "R/aa_helper_pm_functions.R", "R/zzz.R"))
print(x)
shell: Rscript {0}

View File

@ -52,7 +52,7 @@ jobs:
shell: Rscript {0}
- name: Cache R packages
uses: actions/cache@v1
uses: actions/cache@v2
with:
path: ${{ env.R_LIBS_USER }}
key: ${{ runner.os }}-${{ hashFiles('.github/R-version') }}-1-${{ hashFiles('.github/depends.Rds') }}