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

Merge branch '33-add_ci' into 'master'

Resolve "add gitlab-CI pipeline"

Closes #33

See merge request !25
parents 0429ea08 8fba1fba
No related branches found
No related tags found
1 merge request!25Resolve "add gitlab-CI pipeline"
...@@ -6,6 +6,7 @@ ...@@ -6,6 +6,7 @@
^inst/examples/Theis_well_pumping ^inst/examples/Theis_well_pumping
^LICENSE.md ^LICENSE.md
^config.yml ^config.yml
^.gitlab-ci.yml
^doc$ ^doc$
^Meta$ ^Meta$
^data-raw$ ^data-raw$
image: rocker/tidyverse
test:
stage: test
tags:
- envinf2
variables:
R_LIBS_USER: "$CI_PROJECT_DIR/ci/lib/"
RETICULATE_MINICONDA_PATH: "/root/.local/share/r-miniconda/" #default path
RETICULATE_PYTHON_ENV: "/root/.local/share/r-miniconda/envs/r-reticulate/"
# RETICULATE_PYTHON: "$CI_PROJECT_DIR/ci/r-miniconda/envs/r-reticulate/bin/python3"
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"))'
# python dependencies
- if [ ! -d "$RETICULATE_MINICONDA_PATH" ]; then R -e 'reticulate::install_miniconda()'; fi
- R -e 'if(tryCatch(reticulate::import("vtk"), error = function(e) return(TRUE))) reticulate::py_install("vtk")'
- R CMD build . --no-build-vignettes --no-manual
- R CMD check $(ls -1t *.tar.gz | head -n 1) --no-build-vignettes --no-manual
cache:
key: "$CI_COMMIT_REF_SLUG"
untracked: true
paths:
- "$R_LIBS_USER"
- "$RETICULATE_MINICONDA_PATH"
- "$RETICULATE_PYTHON_ENV"
# script will only run then attempting to merge/push to master
only:
- merge_requests
\ No newline at end of file
...@@ -38,9 +38,9 @@ Imports: ...@@ -38,9 +38,9 @@ Imports:
doParallel, doParallel,
reticulate, reticulate,
config, config,
sticky sticky,
foreach
RoxygenNote: 7.1.1 RoxygenNote: 7.1.1
VignetteBuilder: knitr VignetteBuilder: knitr
Depends: Depends:
foreach,
R (>= 2.10) R (>= 2.10)
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