From 2fa8c5442183a949656f7409ab08fcc1c1e19410 Mon Sep 17 00:00:00 2001 From: David Blodgett Date: Mon, 30 Nov 2020 11:19:43 -0600 Subject: [PATCH] gitlab ci --- .Rbuildignore | 3 +- .gitlab-ci.yml | 29 ++++++++++++++++++ .../Yahara_alb/Yahara_River_HRUs_alb_eq.dbf | Bin .../Yahara_alb/Yahara_River_HRUs_alb_eq.prj | 0 .../Yahara_alb/Yahara_River_HRUs_alb_eq.shp | Bin .../Yahara_alb/Yahara_River_HRUs_alb_eq.shx | Bin 6 files changed, 31 insertions(+), 1 deletion(-) create mode 100644 .gitlab-ci.yml mode change 100755 => 100644 tests/testthat/data/Yahara_alb/Yahara_River_HRUs_alb_eq.dbf mode change 100755 => 100644 tests/testthat/data/Yahara_alb/Yahara_River_HRUs_alb_eq.prj mode change 100755 => 100644 tests/testthat/data/Yahara_alb/Yahara_River_HRUs_alb_eq.shp mode change 100755 => 100644 tests/testthat/data/Yahara_alb/Yahara_River_HRUs_alb_eq.shx diff --git a/.Rbuildignore b/.Rbuildignore index 4046e01..701c4bf 100644 --- a/.Rbuildignore +++ b/.Rbuildignore @@ -6,4 +6,5 @@ docs DISCLAIMER.md code.json appveyor.yml -.github \ No newline at end of file +.github +.gitlab-ci.yml \ No newline at end of file diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml new file mode 100644 index 0000000..e6a9b46 --- /dev/null +++ b/.gitlab-ci.yml @@ -0,0 +1,29 @@ +variables: + _R_CHECK_CRAN_INCOMING_: "false" + _R_CHECK_FORCE_SUGGESTS_: "true" + _R_CHECK_DONTTEST_EXAMPLES_: "false" + APT_PKGS: "libudunits2-dev libgdal-dev libgeos-dev libproj-dev libcurl4-openssl-dev libssh2-1-dev libssl-dev libxml2-dev zlib1g-dev git p7zip-full" + +before_script: + - wget --no-check-certificate -O /usr/local/share/ca-certificates/DOIRootCA2.crt https://raw.githubusercontent.com/dblodgett-usgs/hydrogeoenv/master/linux/DOIRootCA2.cer + - chmod 644 /usr/local/share/ca-certificates/DOIRootCA2.crt && update-ca-certificates + - apt-get update + - apt-get install -y --no-install-recommends ${APT_PKGS} + - apt-get install -y --no-install-recommends qpdf pandoc pandoc-citeproc + - export PATH="/usr/local/lib/R/site-library/littler/examples/:${PATH}" + - echo "options(Ncpus = $(nproc --all))" >> /usr/local/lib/R/etc/Rprofile.site + - install2.r devtools + - r -e 'devtools::install_dev_deps()' + +test: + stage: test + tags: + - chs-shared + image: code.chs.usgs.gov:5001/wma/hydrogeoenv:rocker-geospatial + script: + - r -e 'devtools::check(check_dir = ".")' + - r -e 'capture.output(print(covr::coverage_to_list(covr::package_coverage(type = "all")), width = 20), file = "covr.txt", split = TRUE)' + artifacts: + paths: + - "*.Rcheck" + - "covr.txt" diff --git a/tests/testthat/data/Yahara_alb/Yahara_River_HRUs_alb_eq.dbf b/tests/testthat/data/Yahara_alb/Yahara_River_HRUs_alb_eq.dbf old mode 100755 new mode 100644 diff --git a/tests/testthat/data/Yahara_alb/Yahara_River_HRUs_alb_eq.prj b/tests/testthat/data/Yahara_alb/Yahara_River_HRUs_alb_eq.prj old mode 100755 new mode 100644 diff --git a/tests/testthat/data/Yahara_alb/Yahara_River_HRUs_alb_eq.shp b/tests/testthat/data/Yahara_alb/Yahara_River_HRUs_alb_eq.shp old mode 100755 new mode 100644 diff --git a/tests/testthat/data/Yahara_alb/Yahara_River_HRUs_alb_eq.shx b/tests/testthat/data/Yahara_alb/Yahara_River_HRUs_alb_eq.shx old mode 100755 new mode 100644