Skip to content

Commit

Permalink
Apply suggestions from code review
Browse files Browse the repository at this point in the history
Co-authored-by: Nikita Titov <[email protected]>
  • Loading branch information
vnherdeiro and StrikerRUS authored Oct 11, 2024
1 parent 7e81ca9 commit f6e469e
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 9 deletions.
5 changes: 2 additions & 3 deletions .ci/test-r-package.sh
Original file line number Diff line number Diff line change
Expand Up @@ -175,15 +175,14 @@ elif [[ $R_BUILD_TYPE == "cran" ]]; then
-v "$(pwd)/packages:/rchk/packages" \
kalibera/rchk:latest \
"/rchk/packages/${PKG_TARBALL}" \
> ${RCHK_LOG_FILE} 2>&1 \
> "${RCHK_LOG_FILE}" 2>&1 \
|| (cat ${RCHK_LOG_FILE} && exit 1)
cat ${RCHK_LOG_FILE}

# the exceptions below are from R itself and not LightGBM:
# https://github.com/kalibera/rchk/issues/22#issuecomment-656036156
# shellcheck disable=SC2046
exit $(
cat ${RCHK_LOG_FILE} \
cat "${RCHK_LOG_FILE}" \
| grep -v "in function strptime_internal" \
| grep -v "in function RunGenCollect" \
| grep --count -E '\[PB\]|ERROR'
Expand Down
12 changes: 6 additions & 6 deletions .ci/test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ if [[ $TASK == "lint" ]]; then
'scikit-learn>=1.5.2' \
'r-lintr>=3.1.2'
# shellcheck disable=SC1091
source activate $CONDA_ENV
source activate "${CONDA_ENV}"
echo "Linting Python code"
bash ./.ci/lint-python.sh || exit 1
echo "Linting R code"
Expand All @@ -127,11 +127,11 @@ if [[ $TASK == "check-docs" ]] || [[ $TASK == "check-links" ]]; then
conda install \
-q \
-y \
-n $CONDA_ENV \
-n "${CONDA_ENV}" \
'doxygen>=1.10.0' \
'rstcheck>=6.2.4' || exit 1
# shellcheck disable=SC1091
source activate $CONDA_ENV
source activate "${CONDA_ENV}"
# check reStructuredText formatting
find "${BUILD_DIRECTORY}/python-package" -type f -name "*.rst" \
-exec rstcheck --report-level warning {} \+ || exit 1
Expand Down Expand Up @@ -233,7 +233,7 @@ if [[ $TASK == "gpu" ]]; then
elif [[ $METHOD == "wheel" ]]; then
sh ./build-python.sh bdist_wheel --gpu || exit 1
sh ./.ci/check-python-dists.sh ./dist || exit 1
pip install "$(echo ./dist/lightgbm-"${LGB_VER}"*.whl)" -v || exit 1
pip install "$(echo "./dist/lightgbm-${LGB_VER}"*.whl)" -v || exit 1
pytest ./tests || exit 1
exit 0
elif [[ $METHOD == "source" ]]; then
Expand All @@ -258,7 +258,7 @@ elif [[ $TASK == "cuda" ]]; then
elif [[ $METHOD == "wheel" ]]; then
sh ./build-python.sh bdist_wheel --cuda || exit 1
sh ./.ci/check-python-dists.sh ./dist || exit 1
pip install "$(echo ./dist/lightgbm-"${LGB_VER}"*.whl)" -v || exit 1
pip install "$(echo "./dist/lightgbm-${LGB_VER}"*.whl)" -v || exit 1
pytest ./tests || exit 1
exit 0
elif [[ $METHOD == "source" ]]; then
Expand All @@ -278,7 +278,7 @@ elif [[ $TASK == "mpi" ]]; then
elif [[ $METHOD == "wheel" ]]; then
sh ./build-python.sh bdist_wheel --mpi || exit 1
sh ./.ci/check-python-dists.sh ./dist || exit 1
pip install "$(echo ./dist/lightgbm-"${LGB_VER}"*.whl)" -v || exit 1
pip install "$(echo "./dist/lightgbm-${LGB_VER}"*.whl)" -v || exit 1
pytest ./tests || exit 1
exit 0
elif [[ $METHOD == "source" ]]; then
Expand Down

0 comments on commit f6e469e

Please sign in to comment.