-
Notifications
You must be signed in to change notification settings - Fork 4k
[ci] Move check-docs and lint jobs off Travis #3726
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
Merged
Merged
Changes from 9 commits
Commits
Show all changes
18 commits
Select commit
Hold shift + click to select a range
1cab4b0
[ci] Move check-docs and lint jobs off Travis
jameslamb 2abce36
Apply suggestions from code review
jameslamb e96935f
Merge branch 'master' into ci/lint-and-docs
jameslamb 08fb010
Merge branch 'ci/lint-and-docs' of github.com:microsoft/LightGBM into…
jameslamb 61903d6
try moving check-docs into a containerized job
jameslamb 6ec5553
add install flag and README badge
jameslamb 953369d
trying to find the error
jameslamb f38818e
ignore pipefail
jameslamb f35b0c8
remove -e
jameslamb d846fc0
Merge branch 'master' into ci/lint-and-docs
jameslamb 4785401
Apply suggestions from code review
jameslamb 6496d84
more changes
jameslamb 4da8a2b
Merge branch 'ci/lint-and-docs' of github.com:microsoft/LightGBM into…
jameslamb f886b14
additional changes
jameslamb ec7bb1f
Update .github/workflows/static_analysis.yml
jameslamb ef2ef87
Update README.md
jameslamb 1af56f4
move constants
jameslamb 82d9f22
Merge branch 'master' into ci/lint-and-docs
jameslamb 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 |
|---|---|---|
| @@ -0,0 +1,85 @@ | ||
| # contains tests that can run without compiling LightGBM, like | ||
| # linters and documentation checks. | ||
jameslamb marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
StrikerRUS marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
| name: Static Analysis | ||
jameslamb marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
|
||
| on: | ||
| push: | ||
| branches: | ||
| - master | ||
| pull_request: | ||
| branches: | ||
| - master | ||
|
|
||
| env: | ||
| CONDA_ENV: test-env | ||
| GITHUB_ACTIONS: 'true' | ||
| PYTHON_VERSION: 3.8 | ||
|
|
||
| jobs: | ||
| test: | ||
| name: ${{ matrix.task }} | ||
| runs-on: ubuntu-latest | ||
| timeout-minutes: 60 | ||
| strategy: | ||
| fail-fast: false | ||
| matrix: | ||
| include: | ||
| - task: lint | ||
| - task: check-docs | ||
| steps: | ||
| - name: Checkout repository | ||
| uses: actions/[email protected] | ||
| with: | ||
| fetch-depth: 5 | ||
| submodules: false | ||
| - name: Setup and run tests | ||
| shell: bash | ||
| run: | | ||
| export TASK="${{ matrix.task }}" | ||
| export OS_NAME="linux" | ||
jameslamb marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
| export BUILD_DIRECTORY="$GITHUB_WORKSPACE" | ||
| export LGB_VER=$(head -n 1 VERSION.txt) | ||
jameslamb marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
| export CONDA=${HOME}/miniconda | ||
| export PATH=${CONDA}/bin:$HOME/.local/bin:${PATH} | ||
StrikerRUS marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| $GITHUB_WORKSPACE/.ci/setup.sh || exit -1 | ||
| $GITHUB_WORKSPACE/.ci/test.sh || exit -1 | ||
| r-check-docs: | ||
| name: r-package-check-docs | ||
| timeout-minutes: 120 | ||
jameslamb marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
| runs-on: ubuntu-latest | ||
| container: rocker/verse | ||
| steps: | ||
| - name: Checkout repository | ||
| uses: actions/[email protected] | ||
| with: | ||
| fetch-depth: 5 | ||
| submodules: true | ||
| - name: Install packages | ||
| shell: bash | ||
| run: | | ||
| Rscript -e "install.packages(c('R6', 'data.table', 'jsonlite', 'roxygen2', 'testthat'), repos = 'https://cran.r-project.org')" | ||
| 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} | ||
StrikerRUS marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| run: | | ||
| Rscript --vanilla -e "roxygen2::roxygenize('R-package/', load = 'installed')" || exit 100 | ||
jameslamb marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
| 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 101 | ||
jameslamb marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
| fi | ||
| all-successful: | ||
StrikerRUS marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| # https://github.bileizhen.workers.devmunity/t/is-it-possible-to-require-all-github-actions-tasks-to-pass-without-enumerating-them/117957/4?u=graingert | ||
| runs-on: ubuntu-latest | ||
| needs: [test, r-check-docs] | ||
| steps: | ||
| - name: Note that all tests succeeded | ||
| run: echo "🎉" | ||
This file contains hidden or 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 hidden or 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
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.
Uh oh!
There was an error while loading. Please reload this page.