Skip to content

Commit

Permalink
dev
Browse files Browse the repository at this point in the history
  • Loading branch information
StrikerRUS authored Dec 19, 2024
1 parent 14051cf commit 85d705d
Show file tree
Hide file tree
Showing 3 changed files with 49 additions and 47 deletions.
2 changes: 1 addition & 1 deletion .ci/lint-python-bash.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
set -e -E -u -o pipefail

echo "running pre-commit checks"
SKIP=yamllint pre-commit run --all-files || exit 1
pre-commit run --all-files || exit 1
echo "done running pre-commit checks"

echo "running mypy"
Expand Down
93 changes: 47 additions & 46 deletions .github/workflows/static_analysis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ on:
push:
branches:
- master

Check failure on line 8 in .github/workflows/static_analysis.yml

View workflow job for this annotation

GitHub Actions / lint

8:5 [indentation] wrong indentation: expected 6 but found 4
- ci/test
pull_request:
branches:
- master

Check failure on line 12 in .github/workflows/static_analysis.yml

View workflow job for this annotation

GitHub Actions / lint

12:5 [indentation] wrong indentation: expected 6 but found 4
Expand All @@ -31,7 +32,7 @@ jobs:
matrix:
include:
- task: lint
- task: check-docs
# - task: check-docs
steps:
- name: Checkout repository
uses: actions/checkout@v4
Expand All @@ -47,48 +48,48 @@ jobs:
export PATH=${CONDA}/bin:$HOME/.local/bin:${PATH}
$GITHUB_WORKSPACE/.ci/setup.sh || exit 1
$GITHUB_WORKSPACE/.ci/test.sh || exit 1
r-check-docs:
name: r-package-check-docs
timeout-minutes: 60
runs-on: ubuntu-latest
container: rocker/verse
steps:
- name: Trust git cloning LightGBM
run: |
git config --global --add safe.directory "${GITHUB_WORKSPACE}"
- name: Checkout repository
uses: actions/checkout@v4
with:
fetch-depth: 5
submodules: true
- name: Install packages
shell: bash
run: |
Rscript -e "install.packages(c('R6', 'data.table', 'jsonlite', 'knitr', 'markdown', 'Matrix', 'RhpcBLASctl', 'roxygen2', 'testthat'), repos = 'https://cran.rstudio.com', Ncpus = parallel::detectCores())"
sh build-cran-package.sh || exit 1
R CMD INSTALL --with-keep.source lightgbm_*.tar.gz || exit 1
- name: Test documentation
shell: bash --noprofile --norc {0}
run: |
Rscript --vanilla -e "roxygen2::roxygenize('R-package/', load = 'installed')" || exit 1
num_doc_files_changed=$(
git diff --name-only | grep --count -E "\.Rd|NAMESPACE"
)
if [[ ${num_doc_files_changed} -gt 0 ]]; then
echo "Some R documentation files have changed. Please re-generate them and commit those changes."
echo ""
echo " sh build-cran-package.sh"
echo " R CMD INSTALL --with-keep.source lightgbm_*.tar.gz"
echo " Rscript -e \"roxygen2::roxygenize('R-package/', load = 'installed')\""
echo ""
exit 1
fi
all-static-analysis-jobs-successful:
if: always()
runs-on: ubuntu-latest
needs: [test, r-check-docs]
steps:
- name: Note that all tests succeeded
uses: re-actors/alls-green@v1.2.2
with:
jobs: ${{ toJSON(needs) }}
# r-check-docs:
# name: r-package-check-docs
# timeout-minutes: 60
# runs-on: ubuntu-latest
# container: rocker/verse
# steps:
# - name: Trust git cloning LightGBM
# run: |
# git config --global --add safe.directory "${GITHUB_WORKSPACE}"
# - name: Checkout repository
# uses: actions/checkout@v4
# with:
# fetch-depth: 5
# submodules: true
# - name: Install packages
# shell: bash
# run: |
# Rscript -e "install.packages(c('R6', 'data.table', 'jsonlite', 'knitr', 'markdown', 'Matrix', 'RhpcBLASctl', 'roxygen2', 'testthat'), repos = 'https://cran.rstudio.com', Ncpus = parallel::detectCores())"

Check failure on line 68 in .github/workflows/static_analysis.yml

View workflow job for this annotation

GitHub Actions / lint

68:121 [line-length] line too long (215 > 120 characters)
# sh build-cran-package.sh || exit 1
# R CMD INSTALL --with-keep.source lightgbm_*.tar.gz || exit 1
# - name: Test documentation
# shell: bash --noprofile --norc {0}
# run: |
# Rscript --vanilla -e "roxygen2::roxygenize('R-package/', load = 'installed')" || exit 1
# num_doc_files_changed=$(
# git diff --name-only | grep --count -E "\.Rd|NAMESPACE"
# )
# if [[ ${num_doc_files_changed} -gt 0 ]]; then
# echo "Some R documentation files have changed. Please re-generate them and commit those changes."
# echo ""
# echo " sh build-cran-package.sh"
# echo " R CMD INSTALL --with-keep.source lightgbm_*.tar.gz"
# echo " Rscript -e \"roxygen2::roxygenize('R-package/', load = 'installed')\""
# echo ""
# exit 1
# fi
# all-static-analysis-jobs-successful:
# if: always()
# runs-on: ubuntu-latest
# needs: [test, r-check-docs]
# steps:
# - name: Note that all tests succeeded
# uses: re-actors/alls-green@v1.2.2
# with:
# jobs: ${{ toJSON(needs) }}
1 change: 1 addition & 0 deletions .yamllint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,3 +8,4 @@ rules:
truthy:
# prevent treating GitHub Workflow "on" key as boolean value
check-keys: false
# temporarily disabled rules

0 comments on commit 85d705d

Please sign in to comment.