Skip to content
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

[ci] Move check-docs and lint jobs off Travis #3726

Merged
merged 18 commits into from
Jan 7, 2021
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
52 changes: 52 additions & 0 deletions .github/workflows/static_analysis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
# contains tests that can run without compiling LightGBM, like
# linters and documentation checks.
jameslamb marked this conversation as resolved.
Show resolved Hide resolved
StrikerRUS marked this conversation as resolved.
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/checkout@v2.3.4
with:
fetch-depth: 5
submodules: true
jameslamb marked this conversation as resolved.
Show resolved Hide resolved
- name: Setup and run tests
shell: bash
run: |
export TASK="${{ matrix.task }}"
export OS_NAME="linux"
jameslamb marked this conversation as resolved.
Show resolved Hide resolved
export BUILD_DIRECTORY="$GITHUB_WORKSPACE"
export LGB_VER=$(head -n 1 VERSION.txt)
jameslamb marked this conversation as resolved.
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
$GITHUB_WORKSPACE/.ci/test.sh
jameslamb marked this conversation as resolved.
Show resolved Hide resolved
all-successful:
StrikerRUS marked this conversation as resolved.
Show resolved Hide resolved
# https://github.community/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]
steps:
- name: Note that all tests succeeded
run: echo "🎉"
6 changes: 0 additions & 6 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,6 @@ env:
- TASK=sdist
- TASK=bdist
- TASK=if-else
- TASK=lint
- TASK=check-docs
- TASK=mpi METHOD=source
- TASK=mpi METHOD=pip PYTHON_VERSION=3.7
- TASK=mpi METHOD=wheel PYTHON_VERSION=3.7
Expand All @@ -37,10 +35,6 @@ matrix:
env: TASK=gpu METHOD=pip PYTHON_VERSION=3.6
- os: osx
env: TASK=gpu METHOD=wheel PYTHON_VERSION=3.7
- os: osx
env: TASK=lint
- os: osx
env: TASK=check-docs

before_install:
- test -n $CC && unset CC
Expand Down