forked from open-mmlab/mmdeploy
-
Notifications
You must be signed in to change notification settings - Fork 0
46 lines (43 loc) · 1.49 KB
/
lint.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
name: lint
on: [push, pull_request]
permissions:
contents: read
jobs:
lint:
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v3
- name: Set up Python 3.7
uses: actions/setup-python@v4
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: csrc
extensions: h,c,cpp,hpp,cu,cuh
style: file
- name: Check index.rst
run: |
python3 .github/scripts/check_index_rst.py docs/en/index.rst
python3 .github/scripts/check_index_rst.py docs/zh_cn/index.rst
- name: Check doc link
run: |
python3 .github/scripts/doc_link_checker.py --target docs/zh_cn
python3 .github/scripts/doc_link_checker.py --target README_zh-CN.md
python3 .github/scripts/doc_link_checker.py --target docs/en
python3 .github/scripts/doc_link_checker.py --target README.md
- name: Check docstring coverage
run: |
pip install interrogate
interrogate -v --ignore-init-method --ignore-module --ignore-private --ignore-nested-functions --ignore-nested-classes --fail-under 80 mmdeploy
- name: Check pylint score
run: |
pip install pylint
pylint mmdeploy