mirror of
https://github.com/msberends/AMR.git
synced 2025-01-24 04:24:34 +01:00
(v1.7.1.9046) unit tests
This commit is contained in:
parent
b0c84cce9c
commit
9b97233be2
79
.github/workflows/check.yaml
vendored
79
.github/workflows/check.yaml
vendored
@ -77,36 +77,40 @@ jobs:
|
||||
- {os: windows-latest, r: '3.4', allowfail: false}
|
||||
- {os: windows-latest, r: '3.3', allowfail: false}
|
||||
- {os: windows-latest, r: '3.2', allowfail: false}
|
||||
|
||||
env:
|
||||
R_REMOTES_NO_ERRORS_FROM_WARNINGS: true
|
||||
RSPM: ${{ matrix.config.rspm }}
|
||||
R_REPOSITORIES: "https://cran.rstudio.com"
|
||||
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}
|
||||
R_KEEP_PKG_SOURCE: yes
|
||||
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
|
||||
- uses: r-lib/actions/setup-pandoc@v1
|
||||
|
||||
- uses: r-lib/actions/setup-r@v1
|
||||
with:
|
||||
r-version: ${{ matrix.config.r }}
|
||||
http-user-agent: ${{ matrix.config.http-user-agent }}
|
||||
use-public-rspm: true
|
||||
|
||||
- name: show file list
|
||||
run: ls -lh
|
||||
shell: bash
|
||||
|
||||
- name: Install dependencies
|
||||
|
||||
- name: Install Linux dependencies
|
||||
if: runner.os == 'Linux'
|
||||
# update the below with sysreqs::sysreqs("DESCRIPTION") and check the "DEB" entries (for Ubuntu).
|
||||
# we don't want to depend on the sysreqs pkg here, as it requires quite a recent R version
|
||||
# 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: |
|
||||
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()
|
||||
run: |
|
||||
install.packages("remotes", repos = c("https://cloud.r-project.org", "https://cran.rstudio.com"))
|
||||
remotes::install_local("data-raw/AMR_latest.tar.gz", dependencies = TRUE)
|
||||
shell: Rscript {0}
|
||||
|
||||
tar -xf data-raw/AMR_latest.tar.gz
|
||||
Rscript -e "source('data-raw/_install_deps.R')"
|
||||
shell: bash
|
||||
|
||||
- name: Show session info
|
||||
if: always()
|
||||
run: |
|
||||
@ -114,26 +118,43 @@ jobs:
|
||||
utils::sessionInfo()
|
||||
as.data.frame(utils::installed.packages())[, "Version", drop = FALSE]
|
||||
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:
|
||||
_R_CHECK_CRAN_INCOMING_: false
|
||||
_R_CHECK_FORCE_SUGGESTS_: false
|
||||
_R_CHECK_DEPENDS_ONLY_: true
|
||||
_R_CHECK_LENGTH_1_CONDITION_: verbose
|
||||
_R_CHECK_LENGTH_1_LOGIC2_: verbose
|
||||
R_RUN_TINYTEST: true
|
||||
# during 'R CMD check', R_LIBS_USER will be overwritten, so:
|
||||
R_LIBS_USER_GH_ACTIONS: ${{ env.R_LIBS_USER }}
|
||||
|
||||
- name: Show unit tests output
|
||||
if: always()
|
||||
run: find check -name 'tinytest.Rout*' -exec cat '{}' \; || true
|
||||
R_RUN_TINYTEST: true
|
||||
run: |
|
||||
R CMD check --no-manual --run-donttest --run-dontrun AMR
|
||||
shell: bash
|
||||
|
||||
- name: Upload check results
|
||||
- name: Show unit tests output
|
||||
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:
|
||||
name: ${{ matrix.config.os }}-r-${{ matrix.config.r }}-artifacts
|
||||
path: check
|
||||
name: artifacts-${{ matrix.config.os }}-r${{ matrix.config.r }}
|
||||
path: AMR.Rcheck
|
||||
|
@ -1,6 +1,6 @@
|
||||
Package: AMR
|
||||
Version: 1.7.1.9045
|
||||
Date: 2021-09-29
|
||||
Version: 1.7.1.9046
|
||||
Date: 2021-10-03
|
||||
Title: Antimicrobial Resistance Data Analysis
|
||||
Description: Functions to simplify and standardise antimicrobial resistance (AMR)
|
||||
data analysis and to work with microbial and antimicrobial properties by
|
||||
|
4
NEWS.md
4
NEWS.md
@ -1,5 +1,5 @@
|
||||
# `AMR` 1.7.1.9045
|
||||
## <small>Last updated: 29 September 2021</small>
|
||||
# `AMR` 1.7.1.9046
|
||||
## <small>Last updated: 3 October 2021</small>
|
||||
|
||||
### Breaking changes
|
||||
* 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.
@ -44,7 +44,7 @@
|
||||
</button>
|
||||
<span class="navbar-brand">
|
||||
<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>
|
||||
</div>
|
||||
|
||||
@ -190,7 +190,7 @@
|
||||
<div class="page-header toc-ignore">
|
||||
<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>
|
||||
<div class="hidden name"><code>datasets.Rmd</code></div>
|
||||
|
@ -92,7 +92,7 @@
|
||||
</button>
|
||||
<span class="navbar-brand">
|
||||
<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>
|
||||
</div>
|
||||
|
||||
@ -240,12 +240,12 @@
|
||||
<small>Source: <a href='https://github.com/msberends/AMR/blob/master/NEWS.md'><code>NEWS.md</code></a></small>
|
||||
</div>
|
||||
|
||||
<div id="amr-1719045" class="section level1">
|
||||
<h1 class="page-header" data-toc-text="1.7.1.9045">
|
||||
<a href="#amr-1719045" class="anchor" aria-hidden="true"></a><small> Unreleased </small><code>AMR</code> 1.7.1.9045</h1>
|
||||
<div id="last-updated-29-september-2021" class="section level2">
|
||||
<div id="amr-1719046" class="section level1">
|
||||
<h1 class="page-header" data-toc-text="1.7.1.9046">
|
||||
<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-3-october-2021" class="section level2">
|
||||
<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>
|
||||
<div id="breaking-changes" class="section level3">
|
||||
<h3 class="hasAnchor">
|
||||
|
@ -127,7 +127,7 @@ echo "••••••••••••••••••••"
|
||||
echo "• Building package •"
|
||||
echo "••••••••••••••••••••"
|
||||
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
|
||||
mv data-raw/AMR_*.tar.gz data-raw/AMR_latest.tar.gz
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user