(v1.7.1.9046) unit tests

This commit is contained in:
dr. M.S. (Matthijs) Berends 2021-10-03 13:50:52 +02:00
parent b0c84cce9c
commit 9b97233be2
7 changed files with 63 additions and 42 deletions

View File

@ -77,36 +77,40 @@ jobs:
- {os: windows-latest, r: '3.4', allowfail: false} - {os: windows-latest, r: '3.4', allowfail: false}
- {os: windows-latest, r: '3.3', allowfail: false} - {os: windows-latest, r: '3.3', allowfail: false}
- {os: windows-latest, r: '3.2', allowfail: false} - {os: windows-latest, r: '3.2', allowfail: false}
env: env:
R_REMOTES_NO_ERRORS_FROM_WARNINGS: true R_REMOTES_NO_ERRORS_FROM_WARNINGS: true
RSPM: ${{ matrix.config.rspm }} RSPM: ${{ matrix.config.rspm }}
R_REPOSITORIES: "https://cran.rstudio.com" R_REPOSITORIES: "https://cran.rstudio.com"
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}
R_KEEP_PKG_SOURCE: yes
steps: steps:
- uses: actions/checkout@v2 - uses: actions/checkout@v2
- uses: r-lib/actions/setup-pandoc@v1
- uses: r-lib/actions/setup-r@v1 - uses: r-lib/actions/setup-r@v1
with: with:
r-version: ${{ matrix.config.r }} r-version: ${{ matrix.config.r }}
http-user-agent: ${{ matrix.config.http-user-agent }}
use-public-rspm: true - name: Install Linux dependencies
if: runner.os == 'Linux'
- name: show file list # update the below with sysreqs::sysreqs("DESCRIPTION") and check the "DEB" entries (for Ubuntu).
run: ls -lh # we don't want to depend on the sysreqs pkg here, as it requires quite a recent R version
shell: bash # as of May 2021: https://sysreqs.r-hub.io/pkg/AMR,R,cleaner,curl,dplyr,ggplot2,ggtext,knitr,microbenchmark,pillar,readxl,rmarkdown,rstudioapi,rvest,skimr,tidyr,tinytest,xml2,backports,crayon,rlang,vctrs,evaluate,highr,markdown,stringr,yaml,xfun,cli,ellipsis,fansi,lifecycle,utf8,glue,mime,magrittr,stringi,generics,R6,tibble,tidyselect,pkgconfig,purrr,digest,gtable,isoband,MASS,mgcv,scales,withr,nlme,Matrix,farver,labeling,munsell,RColorBrewer,viridisLite,lattice,colorspace,gridtext,Rcpp,RCurl,png,jpeg,bitops,cellranger,progress,rematch,hms,prettyunits,htmltools,jsonlite,tinytex,base64enc,httr,selectr,openssl,askpass,sys,repr,cpp11
run: |
- name: Install dependencies sudo apt install -y libssl-dev pandoc pandoc-citeproc libxml2-dev libicu-dev libcurl4-openssl-dev libpng-dev
- 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
with:
path: ${{ env.R_LIBS_USER }}
key: ${{ matrix.config.os }}-r-${{ matrix.config.r }}-v4
- name: Unpack AMR and install R dependencies
if: always() if: always()
run: | run: |
install.packages("remotes", repos = c("https://cloud.r-project.org", "https://cran.rstudio.com")) tar -xf data-raw/AMR_latest.tar.gz
remotes::install_local("data-raw/AMR_latest.tar.gz", dependencies = TRUE) Rscript -e "source('data-raw/_install_deps.R')"
shell: Rscript {0} shell: bash
- name: Show session info - name: Show session info
if: always() if: always()
run: | run: |
@ -114,26 +118,43 @@ jobs:
utils::sessionInfo() utils::sessionInfo()
as.data.frame(utils::installed.packages())[, "Version", drop = FALSE] as.data.frame(utils::installed.packages())[, "Version", drop = FALSE]
shell: Rscript {0} shell: Rscript {0}
- uses: r-lib/actions/check-r-package@v1 # # - name: Only keep vignettes on release version
# - name: Remove vignettes
# # if: matrix.config.r != 'release'
# if: always()
# # writing to DESCRIPTION2 and then moving to DESCRIPTION is required for R < 3.3 as writeLines() cannot overwrite
# run: |
# rm -rf AMR/vignettes
# Rscript -e "writeLines(readLines('AMR/DESCRIPTION')[!grepl('VignetteBuilder', readLines('AMR/DESCRIPTION'))], 'AMR/DESCRIPTION2')"
# rm AMR/DESCRIPTION
# mv AMR/DESCRIPTION2 AMR/DESCRIPTION
# shell: bash
- name: Run R CMD check
if: always()
env: env:
_R_CHECK_CRAN_INCOMING_: false _R_CHECK_CRAN_INCOMING_: false
_R_CHECK_FORCE_SUGGESTS_: false _R_CHECK_FORCE_SUGGESTS_: false
_R_CHECK_DEPENDS_ONLY_: true _R_CHECK_DEPENDS_ONLY_: true
_R_CHECK_LENGTH_1_CONDITION_: verbose _R_CHECK_LENGTH_1_CONDITION_: verbose
_R_CHECK_LENGTH_1_LOGIC2_: verbose _R_CHECK_LENGTH_1_LOGIC2_: verbose
R_RUN_TINYTEST: true
# during 'R CMD check', R_LIBS_USER will be overwritten, so: # during 'R CMD check', R_LIBS_USER will be overwritten, so:
R_LIBS_USER_GH_ACTIONS: ${{ env.R_LIBS_USER }} R_LIBS_USER_GH_ACTIONS: ${{ env.R_LIBS_USER }}
R_RUN_TINYTEST: true
- name: Show unit tests output run: |
if: always() R CMD check --no-manual --run-donttest --run-dontrun AMR
run: find check -name 'tinytest.Rout*' -exec cat '{}' \; || true
shell: bash shell: bash
- name: Upload check results - name: Show unit tests output
if: always() if: always()
uses: actions/upload-artifact@main run: |
find . -name 'tinytest.Rout*' -exec cat '{}' \; || true
shell: bash
- name: Upload artifacts
if: always()
uses: actions/upload-artifact@v2
with: with:
name: ${{ matrix.config.os }}-r-${{ matrix.config.r }}-artifacts name: artifacts-${{ matrix.config.os }}-r${{ matrix.config.r }}
path: check path: AMR.Rcheck

View File

@ -1,6 +1,6 @@
Package: AMR Package: AMR
Version: 1.7.1.9045 Version: 1.7.1.9046
Date: 2021-09-29 Date: 2021-10-03
Title: Antimicrobial Resistance Data Analysis Title: Antimicrobial Resistance Data Analysis
Description: Functions to simplify and standardise antimicrobial resistance (AMR) Description: Functions to simplify and standardise antimicrobial resistance (AMR)
data analysis and to work with microbial and antimicrobial properties by data analysis and to work with microbial and antimicrobial properties by

View File

@ -1,5 +1,5 @@
# `AMR` 1.7.1.9045 # `AMR` 1.7.1.9046
## <small>Last updated: 29 September 2021</small> ## <small>Last updated: 3 October 2021</small>
### Breaking changes ### Breaking changes
* Removed `p_symbol()` and all `filter_*()` functions (except for `filter_first_isolate()`), which were all deprecated in a previous package version * Removed `p_symbol()` and all `filter_*()` functions (except for `filter_first_isolate()`), which were all deprecated in a previous package version

Binary file not shown.

View File

@ -44,7 +44,7 @@
</button> </button>
<span class="navbar-brand"> <span class="navbar-brand">
<a class="navbar-link" href="../index.html">AMR (for R)</a> <a class="navbar-link" href="../index.html">AMR (for R)</a>
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Latest development version">1.7.1.9045</span> <span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Latest development version">1.7.1.9046</span>
</span> </span>
</div> </div>
@ -190,7 +190,7 @@
<div class="page-header toc-ignore"> <div class="page-header toc-ignore">
<h1 data-toc-skip>Data sets for download / own use</h1> <h1 data-toc-skip>Data sets for download / own use</h1>
<h4 data-toc-skip class="date">29 September 2021</h4> <h4 data-toc-skip class="date">03 October 2021</h4>
<small class="dont-index">Source: <a href="https://github.com/msberends/AMR/blob/master/vignettes/datasets.Rmd" class="external-link"><code>vignettes/datasets.Rmd</code></a></small> <small class="dont-index">Source: <a href="https://github.com/msberends/AMR/blob/master/vignettes/datasets.Rmd" class="external-link"><code>vignettes/datasets.Rmd</code></a></small>
<div class="hidden name"><code>datasets.Rmd</code></div> <div class="hidden name"><code>datasets.Rmd</code></div>

View File

@ -92,7 +92,7 @@
</button> </button>
<span class="navbar-brand"> <span class="navbar-brand">
<a class="navbar-link" href="../index.html">AMR (for R)</a> <a class="navbar-link" href="../index.html">AMR (for R)</a>
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Latest development version">1.7.1.9045</span> <span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Latest development version">1.7.1.9046</span>
</span> </span>
</div> </div>
@ -240,12 +240,12 @@
<small>Source: <a href='https://github.com/msberends/AMR/blob/master/NEWS.md'><code>NEWS.md</code></a></small> <small>Source: <a href='https://github.com/msberends/AMR/blob/master/NEWS.md'><code>NEWS.md</code></a></small>
</div> </div>
<div id="amr-1719045" class="section level1"> <div id="amr-1719046" class="section level1">
<h1 class="page-header" data-toc-text="1.7.1.9045"> <h1 class="page-header" data-toc-text="1.7.1.9046">
<a href="#amr-1719045" class="anchor" aria-hidden="true"></a><small> Unreleased </small><code>AMR</code> 1.7.1.9045</h1> <a href="#amr-1719046" class="anchor" aria-hidden="true"></a><small> Unreleased </small><code>AMR</code> 1.7.1.9046</h1>
<div id="last-updated-29-september-2021" class="section level2"> <div id="last-updated-3-october-2021" class="section level2">
<h2 class="hasAnchor"> <h2 class="hasAnchor">
<a href="#last-updated-29-september-2021" class="anchor" aria-hidden="true"></a><small>Last updated: 29 September 2021</small> <a href="#last-updated-3-october-2021" class="anchor" aria-hidden="true"></a><small>Last updated: 3 October 2021</small>
</h2> </h2>
<div id="breaking-changes" class="section level3"> <div id="breaking-changes" class="section level3">
<h3 class="hasAnchor"> <h3 class="hasAnchor">

View File

@ -127,7 +127,7 @@ echo "••••••••••••••••••••"
echo "• Building package •" echo "• Building package •"
echo "••••••••••••••••••••" echo "••••••••••••••••••••"
echo "• Building 'data-raw/AMR_latest.tar.gz'..." echo "• Building 'data-raw/AMR_latest.tar.gz'..."
Rscript -e "x <- devtools::build(path = 'data-raw', vignettes = TRUE, manual = TRUE, binary = FALSE, quiet = TRUE)" Rscript -e "x <- devtools::build(path = 'data-raw', vignettes = TRUE, manual = FALSE, binary = FALSE, quiet = TRUE)"
rm data-raw/AMR_latest.tar.gz rm data-raw/AMR_latest.tar.gz
mv data-raw/AMR_*.tar.gz data-raw/AMR_latest.tar.gz mv data-raw/AMR_*.tar.gz data-raw/AMR_latest.tar.gz