diff --git a/.ci/test.sh b/.ci/test.sh index 1bc9124fc0a6..84b7d82cad38 100755 --- a/.ci/test.sh +++ b/.ci/test.sh @@ -47,6 +47,7 @@ if [[ $TRAVIS == "true" ]] && [[ $TASK == "lint" ]]; then r-stringi # stringi needs to be installed separate from r-lintr to avoid issues like 'unable to load shared object stringi.so' conda install -q -y -n $CONDA_ENV \ -c conda-forge \ + libxml2 \ r-lintr>=2.0 pip install --user cpplint echo "Linting Python code" diff --git a/.ci/test_r_package.sh b/.ci/test_r_package.sh index 50c274128e84..85c277e42a57 100755 --- a/.ci/test_r_package.sh +++ b/.ci/test_r_package.sh @@ -1,10 +1,10 @@ #!/bin/bash # set up R environment +CRAN_MIRROR="https://cloud.r-project.org/" 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 @@ -69,7 +69,7 @@ packages="c('data.table', 'jsonlite', 'Matrix', 'R6', 'testthat')" if [[ $OS_NAME == "macos" ]]; then packages+=", type = 'binary'" fi -Rscript -e "install.packages(${packages})" || exit -1 +Rscript --vanilla -e "install.packages(${packages}, repos = '${CRAN_MIRROR}', lib = '${R_LIB_PATH}')" || exit -1 cd ${BUILD_DIRECTORY} Rscript build_r.R || exit -1