Commit a2075e5b authored by Delaigue Olivier's avatar Delaigue Olivier
Browse files

Merge branch '29-implement-continuous-integration' into 'dev'

Resolve "Implement continuous integration"

Closes #29

See merge request !11
parents d275b6b5 9b702773
Pipeline #18058 passed with stages
in 1 minute and 21 seconds
^.*\.Rproj$
^\.Rproj\.user$
^packrat/
^\.Rprofile$
^packrat/
^\.gitlab-ci.yml$
stages:
- update_packages
- build
- tests
default:
before_script:
- echo "setwd(\"$(pwd)\")" > .Rprofile
- PATH=~/R/sources/R-${R_VERSION}/bin:$PATH
- rename "s/${R_VERSION}.airGRteaching/airGRteaching/" *.tar.gz
- R -e 'chooseCRANmirror(graphics = FALSE, ind = 1); pkg <- c("dygraphs", "plotrix", "shiny", "shinyjs"); pkgInst <- installed.packages()[, "Package"]; pkgMiss <- setdiff(pkg, pkgInst); if (length(pkgMiss) > 0) install.packages(pkgMiss)'
.update_packages:
stage: update_packages
only:
refs:
- tags
- schedules
script:
- Rscript -e "update.packages(ask=FALSE, repos=\"http://cran.r-project.org\")"
.build:
stage: build
script:
- cd ..
- echo "setwd(\"$(pwd)\")" > .Rprofile
- R CMD build airgrteaching
- rename "s/airGRteaching/${R_VERSION}.airGRteaching/" airGRteaching_*.tar.gz
- mv *.tar.gz airgrteaching/
artifacts:
untracked: true
expire_in: 1 week
.check_as_cran:
stage: tests
script:
- R CMD check --as-cran airGRteaching_*.tar.gz
update_packages_patched:
variables:
R_VERSION: "patched"
extends: .update_packages
update_packages_devel:
variables:
R_VERSION: "devel"
extends: .update_packages
update_packages_oldrel:
variables:
R_VERSION: "oldrel"
extends: .update_packages
build_patched:
variables:
R_VERSION: "patched"
extends: .build
build_devel:
only:
refs:
- tags
- schedules
variables:
R_VERSION: "devel"
extends: .build
build_oldrel:
only:
refs:
- tags
- schedules
variables:
R_VERSION: "oldrel"
extends: .build
check_as_cran_patched:
variables:
R_VERSION: "patched"
extends: .check_as_cran
check_as_cran_devel:
only:
refs:
- tags
- schedules
variables:
R_VERSION: "devel"
extends: .check_as_cran
check_as_cran_oldrel:
only:
refs:
- tags
- schedules
variables:
R_VERSION: "oldrel"
extends: .check_as_cran
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment