Commit 3109a703 authored by Fisher, Jason C.'s avatar Fisher, Jason C.
Browse files

update CICD pipeline

parent 882c58a3
Pipeline #58470 passed with stage
in 6 minutes and 57 seconds
# .gitlab-ci.yml for inldata
image: rocker/geospatial
stages:
- check
image: artifactory.wma.chs.usgs.gov/docker-official-mirror/rocker/geospatial:latest
variables:
_R_CHECK_CRAN_INCOMING_: "false"
_R_CHECK_SUGGESTS_ONLY: "false"
_R_CHECK_FORCE_SUGGESTS_: "true"
APT_CACHE: "$CI_PROJECT_DIR/ci/lib/apt-cache"
CRAN_MIRROR: "https://cloud.r-project.org"
_R_CHECK_DONTTEST_EXAMPLES_: "false"
NOT_CRAN: "true"
R_REMOTES_NO_ERRORS_FROM_WARNINGS: "false"
R_PROFILE: "$R_HOME/etc/Rprofile.site"
R_LIBS_USER: "$CI_PROJECT_DIR/ci/lib"
R_LIBS: "$CI_PROJECT_DIR/ci/lib"
BUILD_LOGS_DIR: "$CI_PROJECT_DIR/ci/logs"
NOT_CRAN: "true"
APT_CACHE: "$CI_PROJECT_DIR/ci/lib/apt-cache"
CRAN: "https://cloud.r-project.org"
getready:
stage: .pre
script:
- mkdir -p $R_LIBS_USER
- mkdir -p $APT_CACHE
- R -e 'install.packages(c("knitr", "dataRetrieval", "inlmisc"), repos=Sys.getenv("CRAN_MIRROR"), lib=Sys.getenv("R_LIBS_USER"))'
cache:
paths:
- $R_LIBS_USER
artifacts:
paths:
- $R_LIBS_USER
cache:
paths:
- $R_LIBS_USER
before_script:
- mkdir -p $APT_CACHE
- echo "options(Ncpus=$(nproc --all), repos=c(CRAN='$CRAN'))" >> $R_PROFILE
- apt-get update && apt-get -o dir::cache::archives=$APT_CACHE install --yes --no-install-recommends qpdf pandoc pandoc-citeproc r-cran-devtools
- Rscript -e "utils::install.packages('remotes')"
- Rscript -e "remotes::install_deps(dependencies=TRUE)"
buildcheck:
stage: check
test:
stage: test
script:
- mkdir -p $BUILD_LOGS_DIR
- apt-get update
- apt-get -o dir::cache::archives=${APT_CACHE} install -y --no-install-recommends qpdf pandoc pandoc-citeproc
- R CMD build . --no-build-vignettes --no-manual
- R -e 'devtools::check(document=FALSE, args="--no-tests", error_on="warning", check_dir=Sys.getenv("BUILD_LOGS_DIR"))'
- R -e "devtools::check(document=FALSE, args='--no-tests', error_on='warning', check_dir='.', vignettes=FALSE)"
artifacts:
paths:
- $BUILD_LOGS_DIR
- "*.Rcheck"
Supports Markdown
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