-
Notifications
You must be signed in to change notification settings - Fork 3.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[DO NOT MERGE][ci] add yaml files linter to pre-commit hook #6758
Draft
StrikerRUS
wants to merge
40
commits into
master
Choose a base branch
from
ci/yamllint
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Draft
Changes from all commits
Commits
Show all changes
40 commits
Select commit
Hold shift + click to select a range
46d1536
Update static_analysis.yml
StrikerRUS 3127b53
Update .pre-commit-config.yaml
StrikerRUS 959aa10
Update .pre-commit-config.yaml
StrikerRUS fc847ab
Update .pre-commit-config.yaml
StrikerRUS d8eed0e
Update .pre-commit-config.yaml
StrikerRUS 58bd0f2
Update .pre-commit-config.yaml
StrikerRUS df67352
Update .pre-commit-config.yaml
StrikerRUS 7256a4d
Update .pre-commit-config.yaml
StrikerRUS bd7dc23
Update .pre-commit-config.yaml
StrikerRUS 4b55c65
Update .pre-commit-config.yaml
StrikerRUS e166ff9
Create .yamllint.yml
StrikerRUS 200f910
Update .yamllint.yml
StrikerRUS efe3a17
Update .yamllint.yml
StrikerRUS 038b067
Update .yamllint.yml
StrikerRUS a83a5c6
Update .yamllint.yml
StrikerRUS 23a021b
Update lock.yml
StrikerRUS eb5c2b1
Update .yamllint.yml
StrikerRUS 9970292
Update lock.yml
StrikerRUS c25e46c
Update triggering_comments.yml
StrikerRUS f62cc0e
Update static_analysis.yml
StrikerRUS 83e943c
Update static_analysis.yml
StrikerRUS e0350b5
Update static_analysis.yml
StrikerRUS b91f372
Update r_valgrind.yml
StrikerRUS 16d3849
Update python_package.yml
StrikerRUS 022948f
Update cuda.yml
StrikerRUS ca5bf6f
Update optional_checks.yml
StrikerRUS 24e97e8
Update r_package.yml
StrikerRUS a71678b
Update no-response.yml
StrikerRUS 32c5f2d
Update _pkgdown.yml
StrikerRUS b1611c4
Update r_valgrind.yml
StrikerRUS b469bdb
Update .vsts-ci.yml
StrikerRUS ce9b67f
Update .vsts-ci.yml
StrikerRUS 6447003
Update .vsts-ci.yml
StrikerRUS fc709d1
Update .vsts-ci.yml
StrikerRUS a924516
Update .vsts-ci.yml
StrikerRUS 80698a8
Update r_package.yml
StrikerRUS 5bcfba2
Update static_analysis.yml
StrikerRUS 07572eb
Update .pre-commit-config.yaml
StrikerRUS ea8897f
Update static_analysis.yml
StrikerRUS d3f5e7e
Merge branch 'master' into ci/yamllint
StrikerRUS File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,10 +3,10 @@ name: CUDA Version | |
on: | ||
push: | ||
branches: | ||
- master | ||
- master | ||
pull_request: | ||
branches: | ||
- master | ||
- master | ||
# Run manually by clicking a button in the UI | ||
workflow_dispatch: | ||
inputs: | ||
|
@@ -43,9 +43,12 @@ jobs: | |
software-properties-common | ||
# set up nvidia-docker | ||
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add - | ||
sudo add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable" -y | ||
sudo add-apt-repository -y \ | ||
"deb [arch=amd64] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable" | ||
curl -sL https://nvidia.github.io/nvidia-docker/gpgkey | sudo apt-key add - | ||
curl -sL https://nvidia.github.io/nvidia-docker/$(. /etc/os-release;echo $ID$VERSION_ID)/nvidia-docker.list | sudo tee /etc/apt/sources.list.d/nvidia-docker.list | ||
curl -sL \ | ||
https://nvidia.github.io/nvidia-docker/$(. /etc/os-release;echo $ID$VERSION_ID)/nvidia-docker.list \ | ||
| sudo tee /etc/apt/sources.list.d/nvidia-docker.list | ||
sudo apt-get update | ||
sudo apt-get install --no-install-recommends -y \ | ||
containerd.io \ | ||
|
@@ -58,6 +61,7 @@ jobs: | |
run: | | ||
exit 0 | ||
test: | ||
# yamllint disable-line rule:line-length | ||
name: ${{ matrix.task }} ${{ matrix.cuda_version }} ${{ matrix.method }} (${{ matrix.linux_version }}, ${{ matrix.compiler }}, Python ${{ matrix.python_version }}) | ||
runs-on: [self-hosted, linux] | ||
needs: [restart-docker] | ||
|
@@ -130,7 +134,7 @@ jobs: | |
runs-on: ubuntu-latest | ||
needs: [test] | ||
steps: | ||
- name: Note that all tests succeeded | ||
uses: re-actors/[email protected] | ||
with: | ||
jobs: ${{ toJSON(needs) }} | ||
- name: Note that all tests succeeded | ||
uses: re-actors/[email protected] | ||
with: | ||
jobs: ${{ toJSON(needs) }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -18,9 +18,14 @@ jobs: | |
- uses: lee-dohm/[email protected] | ||
with: | ||
closeComment: > | ||
This issue has been automatically closed because it has been awaiting a response for too long. | ||
When you have time to to work with the maintainers to resolve this issue, please post a new comment and it will be re-opened. | ||
If the issue has been locked for editing by the time you return to it, please open a new issue and reference this one. | ||
This issue has been automatically closed | ||
because it has been awaiting a response for too long. | ||
|
||
When you have time to to work with the maintainers to resolve this issue, | ||
please post a new comment and it will be re-opened. | ||
If the issue has been locked for editing by the time you return to it, | ||
please open a new issue and reference this one. | ||
|
||
Thank you for taking the time to improve LightGBM! | ||
daysUntilClose: 30 | ||
responseRequiredLabel: awaiting response | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,10 +3,10 @@ name: Python-package | |
on: | ||
push: | ||
branches: | ||
- master | ||
- master | ||
pull_request: | ||
branches: | ||
- master | ||
- master | ||
|
||
# automatically cancel in-progress builds if another commit is pushed | ||
concurrency: | ||
|
@@ -147,7 +147,7 @@ jobs: | |
runs-on: ubuntu-latest | ||
needs: [test, test-latest-versions, test-oldest-versions] | ||
steps: | ||
- name: Note that all tests succeeded | ||
uses: re-actors/[email protected] | ||
with: | ||
jobs: ${{ toJSON(needs) }} | ||
- name: Note that all tests succeeded | ||
uses: re-actors/[email protected] | ||
with: | ||
jobs: ${{ toJSON(needs) }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,10 +3,10 @@ name: R-package | |
on: | ||
push: | ||
branches: | ||
- master | ||
- master | ||
pull_request: | ||
branches: | ||
- master | ||
- master | ||
|
||
# automatically cancel in-progress builds if another commit is pushed | ||
concurrency: | ||
|
@@ -33,6 +33,7 @@ env: | |
|
||
jobs: | ||
test: | ||
# yamllint disable-line rule:line-length | ||
name: ${{ matrix.task }} (${{ matrix.os }}, ${{ matrix.compiler }}, R ${{ matrix.r_version }}, ${{ matrix.build_type }}) | ||
runs-on: ${{ matrix.os }} | ||
container: ${{ matrix.container }} | ||
|
@@ -230,7 +231,10 @@ jobs: | |
- name: Install packages | ||
shell: bash | ||
run: | | ||
RDscript${{ matrix.r_customization }} -e "install.packages(c('R6', 'data.table', 'jsonlite', 'knitr', 'markdown', 'Matrix', 'RhpcBLASctl', 'testthat'), repos = 'https://cran.rstudio.com', Ncpus = parallel::detectCores())" | ||
R_LIBS="c('R6', 'data.table', 'jsonlite', 'knitr', 'markdown', 'Matrix', 'RhpcBLASctl', 'testthat')" | ||
CRAN_MIRROR="https://cran.rstudio.com" | ||
RDscript${{ matrix.r_customization }} \ | ||
-e "install.packages(${R_LIBS}, repos = '${CRAN_MIRROR}', Ncpus = parallel::detectCores())" | ||
sh build-cran-package.sh --r-executable=RD${{ matrix.r_customization }} | ||
RD${{ matrix.r_customization }} CMD INSTALL lightgbm_*.tar.gz || exit 1 | ||
- name: Run tests with sanitizers | ||
|
@@ -295,7 +299,10 @@ jobs: | |
- name: Install packages and run tests | ||
shell: bash | ||
run: | | ||
Rscript -e "install.packages(c('R6', 'data.table', 'jsonlite', 'knitr', 'markdown', 'Matrix', 'RhpcBLASctl'), repos = 'https://cran.rstudio.com', Ncpus = parallel::detectCores())" | ||
R_LIBS="c('R6', 'data.table', 'jsonlite', 'knitr', 'markdown', 'Matrix', 'RhpcBLASctl')" | ||
CRAN_MIRROR="https://cran.rstudio.com" | ||
Rscript \ | ||
-e "install.packages(${R_LIBS}, repos = '${CRAN_MIRROR}', Ncpus = parallel::detectCores())" | ||
sh build-cran-package.sh | ||
|
||
# 'rchk' isn't run through 'R CMD check', use the approach documented at | ||
|
@@ -344,7 +351,7 @@ jobs: | |
runs-on: ubuntu-latest | ||
needs: [test, test-r-sanitizers, test-r-extra-checks] | ||
steps: | ||
- name: Note that all tests succeeded | ||
uses: re-actors/[email protected] | ||
with: | ||
jobs: ${{ toJSON(needs) }} | ||
- name: Note that all tests succeeded | ||
uses: re-actors/[email protected] | ||
with: | ||
jobs: ${{ toJSON(needs) }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5,10 +5,10 @@ name: Static Analysis | |
on: | ||
push: | ||
branches: | ||
- master | ||
- master | ||
pull_request: | ||
branches: | ||
- master | ||
- master | ||
|
||
# automatically cancel in-progress builds if another commit is pushed | ||
concurrency: | ||
|
@@ -64,7 +64,10 @@ jobs: | |
- 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())" | ||
R_LIBS="c('R6', 'data.table', 'jsonlite', 'knitr', 'markdown'" | ||
R_LIBS+=", 'Matrix', 'RhpcBLASctl', 'roxygen2', 'testthat')" | ||
CRAN_MIRROR="https://cran.rstudio.com" | ||
Rscript -e "install.packages(${R_LIBS}, repos = '${CRAN_MIRROR}', Ncpus = parallel::detectCores())" | ||
sh build-cran-package.sh || exit 1 | ||
R CMD INSTALL --with-keep.source lightgbm_*.tar.gz || exit 1 | ||
- name: Test documentation | ||
|
@@ -88,7 +91,7 @@ jobs: | |
runs-on: ubuntu-latest | ||
needs: [test, r-check-docs] | ||
steps: | ||
- name: Note that all tests succeeded | ||
uses: re-actors/[email protected] | ||
with: | ||
jobs: ${{ toJSON(needs) }} | ||
- name: Note that all tests succeeded | ||
uses: re-actors/[email protected] | ||
with: | ||
jobs: ${{ toJSON(needs) }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -6,29 +6,32 @@ on: | |
|
||
jobs: | ||
triggering-tests: | ||
if: github.event.issue.pull_request && contains('OWNER,MEMBER,COLLABORATOR', github.event.comment.author_association) && startsWith(github.event.comment.body, '/gha run') | ||
if: | | ||
github.event.issue.pull_request && | ||
contains('OWNER,MEMBER,COLLABORATOR', github.event.comment.author_association) && | ||
startsWith(github.event.comment.body, '/gha run') | ||
Comment on lines
+9
to
+12
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. |
||
runs-on: ubuntu-latest | ||
env: | ||
SECRETS_WORKFLOW: ${{ secrets.WORKFLOW }} | ||
steps: | ||
- name: Checkout repository | ||
uses: actions/checkout@v4 | ||
with: | ||
fetch-depth: 5 | ||
submodules: false | ||
- name: Checkout repository | ||
uses: actions/checkout@v4 | ||
with: | ||
fetch-depth: 5 | ||
submodules: false | ||
|
||
- name: Trigger R valgrind tests | ||
if: github.event.comment.body == '/gha run r-valgrind' | ||
run: | | ||
$GITHUB_WORKSPACE/.ci/trigger-dispatch-run.sh \ | ||
"${{ github.event.issue.pull_request.url }}" \ | ||
"${{ github.event.comment.id }}" \ | ||
"gha_run_r_valgrind" | ||
- name: Trigger R valgrind tests | ||
if: github.event.comment.body == '/gha run r-valgrind' | ||
run: | | ||
$GITHUB_WORKSPACE/.ci/trigger-dispatch-run.sh \ | ||
"${{ github.event.issue.pull_request.url }}" \ | ||
"${{ github.event.comment.id }}" \ | ||
"gha_run_r_valgrind" | ||
|
||
- name: Trigger update R configure | ||
if: github.event.comment.body == '/gha run r-configure' | ||
run: | | ||
$GITHUB_WORKSPACE/.ci/trigger-dispatch-run.sh \ | ||
"${{ github.event.issue.pull_request.url }}" \ | ||
"${{ github.event.comment.id }}" \ | ||
"gha_run_r_configure" | ||
- name: Trigger update R configure | ||
if: github.event.comment.body == '/gha run r-configure' | ||
run: | | ||
$GITHUB_WORKSPACE/.ci/trigger-dispatch-run.sh \ | ||
"${{ github.event.issue.pull_request.url }}" \ | ||
"${{ github.event.comment.id }}" \ | ||
"gha_run_r_configure" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I like these types of splits for calling scripts / commands with 1 argument per line... let's keep them regardless of how we handle other line-length warnings.