mirror of
https://github.com/msberends/AMR.git
synced 2024-12-25 19:26:13 +01:00
simplify gitlab ci
This commit is contained in:
parent
84825b33b1
commit
d3f5236690
@ -4,17 +4,11 @@
|
|||||||
|
|
||||||
# how the Docker+R images work: https://hub.docker.com/r/rocker/r-ver/
|
# how the Docker+R images work: https://hub.docker.com/r/rocker/r-ver/
|
||||||
|
|
||||||
stages:
|
|
||||||
- build
|
|
||||||
- deploy
|
|
||||||
|
|
||||||
variables:
|
variables:
|
||||||
WARNINGS_ARE_ERRORS: 1
|
WARNINGS_ARE_ERRORS: 1
|
||||||
|
|
||||||
R 3:
|
R 3:
|
||||||
image: rocker/r-ver:3 # rocker/r-base
|
image: rocker/r-ver:3 # test on R v3.*.*
|
||||||
stage: build
|
|
||||||
allow_failure: false
|
|
||||||
script:
|
script:
|
||||||
- apt-get update
|
- apt-get update
|
||||||
# install dependencies for package
|
# install dependencies for package
|
||||||
@ -27,56 +21,15 @@ R 3:
|
|||||||
- R CMD build . --no-build-vignettes --no-manual
|
- R CMD build . --no-build-vignettes --no-manual
|
||||||
- PKG_FILE_NAME=$(ls -1t *.tar.gz | head -n 1)
|
- PKG_FILE_NAME=$(ls -1t *.tar.gz | head -n 1)
|
||||||
- R CMD check "${PKG_FILE_NAME}" --no-build-vignettes --no-manual --as-cran
|
- R CMD check "${PKG_FILE_NAME}" --no-build-vignettes --no-manual --as-cran
|
||||||
- Rscript -e "options()" # to check for variables to circumvent testthat::skip_on_cran
|
|
||||||
# code coverage
|
# code coverage
|
||||||
- apt-get install --yes git
|
- apt-get install --yes git
|
||||||
- Rscript -e 'cc <- covr::package_coverage(); covr::codecov(coverage = cc, token = "50ffa0aa-fee0-4f8b-a11d-8c7edc6d32ca"); cat("Code coverage:", covr::percent_coverage(cc))'
|
- Rscript -e 'cc <- covr::package_coverage(); covr::codecov(coverage = cc, token = "50ffa0aa-fee0-4f8b-a11d-8c7edc6d32ca"); cat("Code coverage:", covr::percent_coverage(cc))'
|
||||||
coverage: '/Code coverage: \d+\.\d+/'
|
coverage: '/Code coverage: \d+\.\d+/'
|
||||||
artifacts:
|
artifacts:
|
||||||
paths:
|
paths:
|
||||||
- '*.Rcheck\**\*.log'
|
- '*.Rcheck/*.log'
|
||||||
- '*.Rcheck\**\*.out'
|
- '*.Rcheck/*.out'
|
||||||
- '*.Rcheck\**\*.fail'
|
- '*.Rcheck/*.fail'
|
||||||
- '*.Rcheck\**\*.Rout'
|
- '*.Rcheck/*.Rout'
|
||||||
name: 'Rcheck log'
|
name: 'Rcheck log'
|
||||||
expire_in: '1 month'
|
expire_in: '1 month'
|
||||||
|
|
||||||
R 3.4:
|
|
||||||
image: rocker/r-ver:3.4 # rocker/r-base
|
|
||||||
stage: build
|
|
||||||
allow_failure: true
|
|
||||||
script:
|
|
||||||
- apt-get update
|
|
||||||
# install dependencies for package
|
|
||||||
- apt-get install --yes --no-install-recommends libxml2-dev libssl-dev libcurl4-openssl-dev zlib1g-dev
|
|
||||||
- R -e 'install.packages("devtools")'
|
|
||||||
- R -e 'devtools::install_deps(dependencies = c("Depends", "Imports", "Suggests"))'
|
|
||||||
# remove vignettes folder and get VignetteBuilder field out of DESCRIPTION file
|
|
||||||
- rm -rf vignettes
|
|
||||||
- R -e 'd <- read.dcf("DESCRIPTION"); d[, colnames(d) == "VignetteBuilder"] <- NA; write.dcf(d, "DESCRIPTION")'
|
|
||||||
- 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
|
|
||||||
|
|
||||||
R 3.5:
|
|
||||||
image: rocker/r-ver:3.5 # rocker/r-base
|
|
||||||
stage: build
|
|
||||||
allow_failure: true
|
|
||||||
script:
|
|
||||||
- apt-get update
|
|
||||||
# install dependencies for package
|
|
||||||
- apt-get install --yes --no-install-recommends libxml2-dev libssl-dev libcurl4-openssl-dev zlib1g-dev
|
|
||||||
- R -e 'install.packages("devtools")'
|
|
||||||
- R -e 'devtools::install_deps(dependencies = c("Depends", "Imports", "Suggests"))'
|
|
||||||
# remove vignettes folder and get VignetteBuilder field out of DESCRIPTION file
|
|
||||||
- rm -rf vignettes
|
|
||||||
- R -e 'd <- read.dcf("DESCRIPTION"); d[, colnames(d) == "VignetteBuilder"] <- NA; write.dcf(d, "DESCRIPTION")'
|
|
||||||
- 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
|
|
||||||
|
|
||||||
coverage_job:
|
|
||||||
# image: rocker/r-ver:3
|
|
||||||
stage: deploy
|
|
||||||
script:
|
|
||||||
- ls
|
|
||||||
|
@ -146,7 +146,7 @@ This is the latest **development version**. Although it may contain bugfixes and
|
|||||||
|
|
||||||
Development Test | Result | Reference
|
Development Test | Result | Reference
|
||||||
--- | :---: | ---
|
--- | :---: | ---
|
||||||
All functions checked on Linux and macOS | [![pipeline status](https://gitlab.com/msberends/AMR/badges/master/pipeline.svg)](https://gitlab.com/msberends/AMR/commits/master) | GitLab [[ref 1]](https://gitlab.com/msberends/AMR/pipelines)
|
All functions checked on Linux | [![pipeline status](https://gitlab.com/msberends/AMR/badges/master/pipeline.svg)](https://gitlab.com/msberends/AMR/commits/master) | GitLab CI [[ref 1]](https://gitlab.com/msberends/AMR/pipelines)
|
||||||
All functions checked on Windows | [![AppVeyor_Build](https://ci.appveyor.com/api/projects/status/gitlab/msberends/AMR?branch=master&svg=true)](https://ci.appveyor.com/project/msberends/amr-svxon) | Appveyor Systems Inc. [[ref 2]](https://ci.appveyor.com/project/msberends/amr-svxon)
|
All functions checked on Windows | [![AppVeyor_Build](https://ci.appveyor.com/api/projects/status/gitlab/msberends/AMR?branch=master&svg=true)](https://ci.appveyor.com/project/msberends/amr-svxon) | Appveyor Systems Inc. [[ref 2]](https://ci.appveyor.com/project/msberends/amr-svxon)
|
||||||
Percentage of syntax lines checked | [![Code_Coverage](https://codecov.io/gl/msberends/AMR/branch/master/graph/badge.svg)](https://codecov.io/gl/msberends/AMR) | Codecov LLC [[ref 3]](https://codecov.io/gl/msberends/AMR)
|
Percentage of syntax lines checked | [![Code_Coverage](https://codecov.io/gl/msberends/AMR/branch/master/graph/badge.svg)](https://codecov.io/gl/msberends/AMR) | Codecov LLC [[ref 3]](https://codecov.io/gl/msberends/AMR)
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user