Skip to content
Snippets Groups Projects
Commit 9a9bc838 authored by Johannes Boog's avatar Johannes Boog
Browse files

[ci] update ci to use renv

parent 4e9ba11c
No related branches found
No related tags found
2 merge requests!5978 packrat to renv,!5878 packrat to renv
......@@ -6,21 +6,18 @@ stages:
- test
test:
image: $CI_REGISTRY_IMAGE:09092022
image: $CI_REGISTRY_IMAGE:24032023
stage: test
tags:
- envinf2
variables:
R_LIBS_USER: "$CI_PROJECT_DIR/ci/lib/"
RETICULATE_MINICONDA_PATH: "/root/.local/share/r-miniconda/" #default path
RETICULATE_MINICONDA_PATH: "/root/.local/share/r-miniconda/"
RETICULATE_PYTHON_ENV: "/root/.local/share/r-miniconda/envs/r-reticulate/"
RENV_CONFIG_EXTERNAL_LIBRARIES: "/usr/local/lib/R/site-library:/usr/local/lib/R/library"
RENV_PATHS_LIBRARY: "$CI_PROJECT_DIR/ci/renv/library"
script:
- if [ ! -d "$R_LIBS_USER" ]; then mkdir -p "$R_LIBS_USER"; fi
- R -e 'withr::with_libpaths(new = Sys.getenv("R_LIBS_USER"), devtools::install_deps(dependencies = T))'
# checks if the packages from the Imports, Suggests, LinkinTo field
# are already installed in the cache
- R -e '.libPaths(new = Sys.getenv("R_LIBS_USER"))'
- R -e 'withr::with_libpaths(new = Sys.getenv("R_LIBS_USER"), {install.packages("BiocManager"); BiocManager::install("rhdf5")})'
# Install deps or load from renv cache
- R -e 'renv::restore()'
# Build and Check r2ogs6
- R CMD build . --no-build-vignettes --no-manual
- R CMD check $(ls -1t *.tar.gz | head -n 1) --no-build-vignettes --no-manual
......@@ -31,7 +28,7 @@ test:
key: "$CI_COMMIT_REF_SLUG"
untracked: true
paths:
- "$R_LIBS_USER"
- "$RENV_PATHS_LIBRARY"
rules:
- if: '$CI_PIPELINE_SOURCE == "merge_request_event" || $CI_PIPELINE_SOURCE == "web"'
- if: '$CI_COMMIT_BRANCH == "master"'
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment