update ci (#235)

pull/12/head
RunningLeon 2021-11-29 14:41:23 +08:00 committed by GitHub
parent d0bb497b0c
commit 24c3134529
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 45 additions and 29 deletions

View File

@ -1,36 +1,19 @@
name: build
on: [push, pull_request]
on:
push:
paths:
- '!demo/**'
- '!tools/**'
pull_request:
paths:
- '!demo/**'
- '!tools/**'
- '!docs/**'
- '!docs_zh-CN/**'
jobs:
lint:
runs-on: ubuntu-18.04
steps:
- uses: actions/checkout@v2
- name: Set up Python 3.7
uses: actions/setup-python@v2
with:
python-version: 3.7
- name: Install pre-commit hook
run: |
pip install pre-commit
pre-commit install
- name: Linting
run: pre-commit run --all-files
- name: Format c/cuda codes with clang-format
uses: DoozyX/clang-format-lint-action@v0.11
with:
source: backend_ops
extensions: h,c,cpp,hpp,cu,cuh
style: google
- name: Check docstring coverage
run: |
pip install interrogate
interrogate -v --ignore-init-method --ignore-module --ignore-private --ignore-nested-functions --ignore-nested-classes --ignore-regex "DeployBase*" --fail-under 95 mmdeploy
- name: Check pylint score
run: |
pip install pylint
pylint mmdeploy
build_cpu:
runs-on: ubuntu-18.04
strategy:

33
.github/workflows/lint.yml vendored 100644
View File

@ -0,0 +1,33 @@
name: lint
on: [push, pull_request]
jobs:
lint:
runs-on: ubuntu-18.04
steps:
- uses: actions/checkout@v2
- name: Set up Python 3.7
uses: actions/setup-python@v2
with:
python-version: 3.7
- name: Install pre-commit hook
run: |
pip install pre-commit
pre-commit install
- name: Linting
run: pre-commit run --all-files
- name: Format c/cuda codes with clang-format
uses: DoozyX/clang-format-lint-action@v0.11
with:
source: backend_ops
extensions: h,c,cpp,hpp,cu,cuh
style: google
- name: Check docstring coverage
run: |
pip install interrogate
interrogate -v --ignore-init-method --ignore-module --ignore-private --ignore-nested-functions --ignore-nested-classes --ignore-regex "DeployBase*" --fail-under 95 mmdeploy
- name: Check pylint score
run: |
pip install pylint
pylint mmdeploy