Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/rel-6.5.2225'
Browse files Browse the repository at this point in the history
  • Loading branch information
Crunch.io Jenkins Account committed Nov 3, 2023
2 parents 625ff80 + adeef76 commit ce53141
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 8 deletions.
4 changes: 2 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ install-ci: deps
R -e 'devtools::session_info(installed.packages()[, "Package"])'

test-ci: compress-fixtures |
R --slave -e 'library(covr); to_cobertura(package_coverage(quiet=FALSE))'
R --slave -e 'library(covr); install_dir <- tempfile(); to_cobertura(package_coverage(quiet=FALSE, install_path=install_dir, clean=FALSE)); for (file in list.files(install_dir, pattern = "\\.Rout(\\.fail)?$$", recursive=TRUE, full.names=TRUE)) { cat(readLines(file), sep = "\n"); cat("\n") }'

clean:
R --slave -e 'library(crunch); set_crunch_opts(crunch.api=envOrOption("test.api"), crunch.api.key=envOrOption("crunch.test.api.key")); lapply(urls(datasets()), crDELETE)'
Expand Down Expand Up @@ -62,7 +62,7 @@ spell:
R --slave -e 'spelling::spell_check_package(vignettes=TRUE, lang="en_US")'

covr:
R --slave -e 'Sys.setenv(R_TEST_USER=getOption("test.user"), R_TEST_PW=getOption("test.pw"), R_TEST_API=getOption("test.api")); library(covr); cv <- package_coverage(); df <- covr:::to_shiny_data(cv)[["file_stats"]]; cat("Line coverage:", round(100*sum(df[["Covered"]])/sum(df[["Relevant"]]), 1), "percent\\n"); shine(cv, browse=TRUE)'
R --slave -e 'Sys.setenv(R_TEST_API=getOption("test.api")); library(covr); cv <- package_coverage(); df <- covr:::to_shiny_data(cv)[["file_stats"]]; cat("Line coverage:", round(100*sum(df[["Covered"]])/sum(df[["Relevant"]]), 1), "percent\\n"); shine(cv, browse=TRUE)'

compress-fixtures:
Rscript 'dev-misc/compress-mocks.R'
10 changes: 4 additions & 6 deletions docker/jenkins/Dockerfile.rcrunch
Original file line number Diff line number Diff line change
@@ -1,26 +1,24 @@
FROM rstudio/r-base:3.6-bionic
ARG RPROXY_CREDS
ARG HOMEDIR=/home/jenkins
ARG R_LIB
ARG R_LIBS
ENV R_LIB=${HOMEDIR}/R/master
ENV R_LIBS=${R_LIB}
ARG USER=997
ARG GROUP=991
ENV HOMEDIR=${HOMEDIR}
ENV R_LIBS=${HOMEDIR}/rlibs
USER root
RUN locale-gen en_US.UTF-8
ENV LANG=en_US.UTF-8
RUN apt-get update && apt-get install build-essential libtiff5-dev libfribidi-dev libfontconfig1-dev libgit2-dev libssl-dev libcurl4-gnutls-dev libxml2-dev libsodium-dev -y
# Add the user/group jenkins
RUN groupadd --gid ${GROUP} jenkins \
&& useradd --uid ${USER} --gid jenkins --shell /bin/bash --create-home -d ${HOMEDIR} jenkins
COPY --chown=jenkins:jenkins . ${HOMEDIR}
# Copy only the minimal amount of the package to install dependencies
COPY --chown=jenkins:jenkins ./DESCRIPTION ./Makefile ${HOMEDIR}
WORKDIR ${HOMEDIR}
RUN echo 'local({\n\
r <- getOption("repos")\n\
r["Nexus"] <- "https://'${RPROXY_CREDS}'@ui.nexus.crint.net/repository/rcrunch/"\n\
options(repos = r)\n\
})'> /usr/lib/R/etc/Rprofile.site
RUN make install-ci
USER jenkins
RUN mkdir ${R_LIBS} && make install-ci

0 comments on commit ce53141

Please sign in to comment.