Add Basic Pylint and Mypy Tooling (#1100) #1
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
name: Python Lint | |
on: [push, pull_request] | |
env: | |
IMAGE: 'mlcaidev/ci-cpu:2c03e7f' | |
jobs: | |
isort: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
with: | |
submodules: 'recursive' | |
- name: Version | |
run: | | |
wget https://raw.githubusercontent.com/mlc-ai/package/main/docker/bash.sh -O ./ci/bash.sh | |
chmod u+x ./ci/bash.sh | |
./ci/bash.sh $IMAGE "conda env export --name ci-lint" | |
- name: Lint | |
run: | | |
./ci/bash.sh $IMAGE bash ./ci/task/isort.sh | |
black: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
with: | |
submodules: 'recursive' | |
- name: Version | |
run: | | |
wget https://raw.githubusercontent.com/mlc-ai/package/main/docker/bash.sh -O ./ci/bash.sh | |
chmod u+x ./ci/bash.sh | |
./ci/bash.sh $IMAGE "conda env export --name ci-lint" | |
- name: Lint | |
run: | | |
./ci/bash.sh $IMAGE bash ./ci/task/black.sh | |
mypy: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
with: | |
submodules: 'recursive' | |
- name: Version | |
run: | | |
wget https://raw.githubusercontent.com/mlc-ai/package/main/docker/bash.sh -O ./ci/bash.sh | |
chmod u+x ./ci/bash.sh | |
./ci/bash.sh $IMAGE "conda env export --name ci-lint" | |
- name: Lint | |
run: | | |
./ci/bash.sh $IMAGE bash ./ci/task/mypy.sh | |
pylint: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
with: | |
submodules: 'recursive' | |
- name: Version | |
run: | | |
wget https://raw.githubusercontent.com/mlc-ai/package/main/docker/bash.sh -O ./ci/bash.sh | |
chmod u+x ./ci/bash.sh | |
./ci/bash.sh $IMAGE "conda env export --name ci-lint" | |
- name: Lint | |
run: | | |
./ci/bash.sh $IMAGE bash ./ci/task/pylint.sh |