CI - test also on r-devel

This commit is contained in:
dr. M.S. (Matthijs) Berends 2019-03-29 14:34:39 +01:00
parent 7dca9791a2
commit 248e508e9b
4 changed files with 44 additions and 10 deletions

4
.gitignore vendored
View File

@ -18,8 +18,6 @@ vignettes/*.R
.DS_Store .DS_Store
.Rprofile .Rprofile
^CRAN-RELEASE$ ^CRAN-RELEASE$
git_premaster.sh git_*.sh
git_merge.sh
git_siteonly.sh
packrat/lib*/ packrat/lib*/
packrat/src/ packrat/src/

View File

@ -30,7 +30,7 @@ image: debian:buster-slim
before_script: before_script:
- apt-get update -qq - apt-get update -qq
# install dependencies for packages # 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 # recent pandoc
- wget --quiet https://github.com/jgm/pandoc/releases/download/2.6/pandoc-2.6-1-amd64.deb - wget --quiet https://github.com/jgm/pandoc/releases/download/2.6/pandoc-2.6-1-amd64.deb
- dpkg -i pandoc*.deb - dpkg -i pandoc*.deb
@ -49,19 +49,41 @@ before_script:
- echo 'LANGUAGE="en_US.utf8"' >> .Renviron - echo 'LANGUAGE="en_US.utf8"' >> .Renviron
- echo 'LANG="en_US.utf8"' >> .Renviron - echo 'LANG="en_US.utf8"' >> .Renviron
- echo 'LANGUAGE="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: cache:
key: "$CI_COMMIT_REF_SLUG" key: "$CI_COMMIT_REF_SLUG"
paths: paths:
- installed_deps/ - installed_deps/
R: R-release:
stage: build stage: build
image: debian:buster-slim
allow_failure: false allow_failure: false
script: 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 # remove vignettes folder and get VignetteBuilder field out of DESCRIPTION file
- rm -rf vignettes - rm -rf vignettes
- Rscript -e 'd <- read.dcf("DESCRIPTION"); d[, colnames(d) == "VignetteBuilder"] <- NA; write.dcf(d, "DESCRIPTION")' - Rscript -e 'd <- read.dcf("DESCRIPTION"); d[, colnames(d) == "VignetteBuilder"] <- NA; write.dcf(d, "DESCRIPTION")'
@ -76,7 +98,12 @@ R:
coverage: coverage:
stage: test stage: test
image: debian:buster-slim
allow_failure: true 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 when: on_success
only: only:
- premaster - premaster
@ -89,6 +116,11 @@ coverage:
pages: pages:
stage: deploy 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 when: always
only: only:
- master - master

View File

@ -1,6 +1,6 @@
Package: AMR Package: AMR
Version: 0.6.1 Version: 0.6.1.9001
Date: 2019-03-28 Date: 2019-03-29
Title: Antimicrobial Resistance Analysis Title: Antimicrobial Resistance Analysis
Authors@R: c( Authors@R: c(
person( person(

View File

@ -1,3 +1,7 @@
# AMR 0.6.1.9001
**Note: latest development version**
# AMR 0.6.1 # AMR 0.6.1
#### Changed #### Changed