stages: - update_packages - build - regression - tests default: before_script: - echo "setwd(\"$(pwd)\")" > .Rprofile - PATH=~/R/sources/R-${R_VERSION}/bin:$PATH - rename "s/${R_VERSION}.airGR/airGR/" *.tar.gz - R -e 'chooseCRANmirror(graphics = FALSE, ind = 1); pkg <- "caRamel"; 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 airgr - rename "s/airGR/${R_VERSION}.airGR/" airGR_*.tar.gz - mv *.tar.gz airgr/ artifacts: untracked: true expire_in: 1 week .regression: stage: regression script: - Rscript tests/testthat/regression_tests.R stable - R CMD INSTALL . - Rscript tests/testthat/regression_tests.R dev - Rscript tests/testthat/regression_tests.R compare .check_not_cran: stage: tests variables: NOT_CRAN: "true" script: - R CMD check airGR_*.tar.gz .check_as_cran: stage: tests script: - R CMD check --as-cran airGR_*.tar.gz update_packages_patched: variables: R_VERSION: "patched" extends: .update_packages build_patched: variables: R_VERSION: "patched" extends: .build regression_patched: variables: R_VERSION: "patched" extends: .regression regression_devel: only: refs: - schedules variables: R_VERSION: "devel" extends: .regression regression_oldrel: only: refs: - schedules variables: R_VERSION: "oldrel" extends: .regression check_not_cran_patched: variables: R_VERSION: "patched" extends: .check_not_cran check_as_cran_patched: variables: R_VERSION: "patched" extends: .check_as_cran update_packages_devel: variables: R_VERSION: "devel" extends: .update_packages build_devel: only: refs: - tags - schedules variables: R_VERSION: "devel" extends: .build check_not_cran_devel: only: refs: - tags - schedules variables: R_VERSION: "devel" extends: .check_not_cran check_as_cran_devel: only: refs: - tags - schedules variables: R_VERSION: "devel" extends: .check_as_cran update_packages_oldrel: variables: R_VERSION: "oldrel" extends: .update_packages build_oldrel: only: refs: - tags - schedules variables: R_VERSION: "oldrel" extends: .build check_not_cran_oldrel: only: refs: - tags - schedules variables: R_VERSION: "oldrel" extends: .check_not_cran check_as_cran_oldrel: only: refs: - tags - schedules variables: R_VERSION: "oldrel" extends: .check_as_cran