Skip to content

Commit

Permalink
cleaned up test.sh
Browse files Browse the repository at this point in the history
  • Loading branch information
jameslamb committed Nov 6, 2019
1 parent aabf223 commit 275708c
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions .ci/test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -76,12 +76,11 @@ if [[ $TASK == "if-else" ]]; then
fi

if [[ $TASK == "r-pkg" ]]; then
#. set up R environment
# set up R environment
R_LIB_PATH=~/Rlib
mkdir -p $R_LIB_PATH
echo "R_LIBS=$R_LIB_PATH" > ${HOME}/.Renviron
echo 'options(repos = "https://cran.rstudio.com")' > ${HOME}/.Rprofile

export PATH="$R_LIB_PATH/R/bin:$PATH"

# installing precompiled R for Ubuntu
Expand Down Expand Up @@ -116,7 +115,7 @@ if [[ $TASK == "r-pkg" ]]; then
--no-deps \
pandoc

# Manually install Depends, Imports, and Suggests libraries
# Manually install Depends and Imports libraries + 'testthat'
# to avoid a CI-time dependency on devtools (for devtools::install_deps())
Rscript -e "install.packages(c('data.table', 'jsonlite', 'Matrix', 'R6', 'testthat'))" || exit -1

Expand All @@ -126,9 +125,11 @@ if [[ $TASK == "r-pkg" ]]; then
PKG_TARBALL=$(ls | grep '^lightgbm_.*\.tar\.gz$')
LOG_FILE_NAME="lightgbm.Rcheck/00check.log"

# suppress R CMD check warning from Suggests dependencies not being available
export _R_CHECK_FORCE_SUGGESTS_=0

# fails tests if either ERRORs or WARNINGs are thrown by
# R CMD CHECK
export _R_CHECK_FORCE_SUGGESTS_=0
R CMD check ${PKG_TARBALL} \
--as-cran \
--no-manual \
Expand Down

0 comments on commit 275708c

Please sign in to comment.