From 248e508e9b3d1d25799617c325773721fa9a289d Mon Sep 17 00:00:00 2001 From: "Matthijs S. Berends" Date: Fri, 29 Mar 2019 14:34:39 +0100 Subject: [PATCH] CI - test also on r-devel --- .gitignore | 4 +--- .gitlab-ci.yml | 42 +++++++++++++++++++++++++++++++++++++----- DESCRIPTION | 4 ++-- NEWS.md | 4 ++++ 4 files changed, 44 insertions(+), 10 deletions(-) diff --git a/.gitignore b/.gitignore index df3420ec..8890d879 100755 --- a/.gitignore +++ b/.gitignore @@ -18,8 +18,6 @@ vignettes/*.R .DS_Store .Rprofile ^CRAN-RELEASE$ -git_premaster.sh -git_merge.sh -git_siteonly.sh +git_*.sh packrat/lib*/ packrat/src/ diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index d014af19..6ade2781 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -30,7 +30,7 @@ image: debian:buster-slim before_script: - apt-get update -qq # install dependencies for packages - - apt-get install -y wget locales libxml2-dev libssl-dev libcurl4-openssl-dev zlib1g-dev r-base > /dev/null + - apt-get install -y wget locales libxml2-dev libssl-dev libcurl4-openssl-dev zlib1g-dev > /dev/null # recent pandoc - wget --quiet https://github.com/jgm/pandoc/releases/download/2.6/pandoc-2.6-1-amd64.deb - dpkg -i pandoc*.deb @@ -49,19 +49,41 @@ before_script: - echo 'LANGUAGE="en_US.utf8"' >> .Renviron - echo 'LANG="en_US.utf8"' >> .Renviron - echo 'LANGUAGE="en_US.utf8"' > ~/.Renviron - - Rscript -e 'sessionInfo()' - # install missing and outdated packages - - Rscript -e 'source(".gitlab-ci.R"); gl_update_pkg_all(repos = "https://cran.rstudio.com", quiet = TRUE, install_pkgdown = TRUE)' cache: key: "$CI_COMMIT_REF_SLUG" paths: - installed_deps/ -R: +R-release: stage: build + image: debian:buster-slim allow_failure: false script: + - apt-get install r-base > /dev/null + - Rscript -e 'sessionInfo()' + # install missing and outdated packages + - Rscript -e 'source(".gitlab-ci.R"); gl_update_pkg_all(repos = "https://cran.rstudio.com", quiet = TRUE, install_pkgdown = TRUE)' + # remove vignettes folder and get VignetteBuilder field out of DESCRIPTION file + - rm -rf vignettes + - Rscript -e 'd <- read.dcf("DESCRIPTION"); d[, colnames(d) == "VignetteBuilder"] <- NA; write.dcf(d, "DESCRIPTION")' + # build package + - R CMD build . --no-build-vignettes --no-manual + - PKG_FILE_NAME=$(ls -1t *.tar.gz | head -n 1) + - R CMD check "${PKG_FILE_NAME}" --no-build-vignettes --no-manual --as-cran + artifacts: + paths: + - '*.Rcheck/*' + expire_in: '1 month' + +R-devel: + stage: build + image: rocker:r-devel + allow_failure: true + script: + - Rscript -e 'sessionInfo()' + # install missing and outdated packages + - Rscript -e 'source(".gitlab-ci.R"); gl_update_pkg_all(repos = "https://cran.rstudio.com", quiet = TRUE, install_pkgdown = TRUE)' # remove vignettes folder and get VignetteBuilder field out of DESCRIPTION file - rm -rf vignettes - Rscript -e 'd <- read.dcf("DESCRIPTION"); d[, colnames(d) == "VignetteBuilder"] <- NA; write.dcf(d, "DESCRIPTION")' @@ -76,7 +98,12 @@ R: coverage: stage: test + image: debian:buster-slim allow_failure: true + script: + - apt-get install r-base > /dev/null + # install missing and outdated packages + - Rscript -e 'source(".gitlab-ci.R"); gl_update_pkg_all(repos = "https://cran.rstudio.com", quiet = TRUE, install_pkgdown = TRUE)' when: on_success only: - premaster @@ -89,6 +116,11 @@ coverage: pages: stage: deploy + image: debian:buster-slim + script: + - apt-get install r-base > /dev/null + # install missing and outdated packages + - Rscript -e 'source(".gitlab-ci.R"); gl_update_pkg_all(repos = "https://cran.rstudio.com", quiet = TRUE, install_pkgdown = TRUE)' when: always only: - master diff --git a/DESCRIPTION b/DESCRIPTION index 71b8c4a2..f1406b8d 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -1,6 +1,6 @@ Package: AMR -Version: 0.6.1 -Date: 2019-03-28 +Version: 0.6.1.9001 +Date: 2019-03-29 Title: Antimicrobial Resistance Analysis Authors@R: c( person( diff --git a/NEWS.md b/NEWS.md index f83415d8..e8d65843 100755 --- a/NEWS.md +++ b/NEWS.md @@ -1,3 +1,7 @@ +# AMR 0.6.1.9001 +**Note: latest development version** + + # AMR 0.6.1 #### Changed