Skip to content

Commit

Permalink
check for R NOTEs in logs (#337)
Browse files Browse the repository at this point in the history
* check for R NOTEs in logs

* Update r_tests.sh

* Update r_tests.sh

* try _R_CHECK_CRAN_INCOMING_
  • Loading branch information
StrikerRUS committed Feb 15, 2021
1 parent 2648265 commit caf6ee6
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions .ci/r_tests.sh
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,11 @@ R_LIB_PATH=$HOME/R
mkdir -p $R_LIB_PATH
echo "R_LIBS=$R_LIB_PATH" > .Renviron

# ignore R CMD CHECK NOTE checking how long it has
# been since the last submission
export _R_CHECK_CRAN_INCOMING_=0
export _R_CHECK_CRAN_INCOMING_REMOTE_=0

if [[ $OS_NAME == "macos-latest" ]]; then
Rscript -e "install.packages('devtools', dependencies = TRUE, repos = 'https://cran.r-project.org')"
fi
Expand All @@ -34,8 +39,8 @@ LOG_FILE_NAME="$PKG_NAME.Rcheck/00check.log"
COVERAGE_FILE_NAME="$PKG_NAME.Rcheck/coverage.log"

R CMD check "${PKG_FILE_NAME}" --as-cran || exit -1
if grep -q -E "WARNING|ERROR" "$LOG_FILE_NAME"; then
echo "WARNINGs or ERRORs have been found by R CMD check"
if grep -q -E "NOTE|WARNING|ERROR" "$LOG_FILE_NAME"; then
echo "NOTEs, WARNINGs or ERRORs have been found by R CMD check"
exit -1
fi

Expand Down

0 comments on commit caf6ee6

Please sign in to comment.