Skip to content

Commit 5188920

Browse files
del-zhenwuZwwWayne
authored andcommitted
Skip CI on ignoring paths (open-mmlab#6578)
* [test] Skip CI on ignoring paths Signed-off-by: del-zhenwu <[email protected]> * [skip ci] fix build.yaml Signed-off-by: del-zhenwu <[email protected]> * split lint in workflows Signed-off-by: del-zhenwu <[email protected]> * split lint in workflows Signed-off-by: del-zhenwu <[email protected]> * split lint in workflows Signed-off-by: del-zhenwu <[email protected]>
1 parent 4212bcc commit 5188920

File tree

2 files changed

+37
-20
lines changed

2 files changed

+37
-20
lines changed

.github/workflows/build.yml

+14-20
Original file line numberDiff line numberDiff line change
@@ -1,27 +1,21 @@
11
name: build
22

3-
on: [push, pull_request]
3+
on:
4+
push:
5+
paths:
6+
- '!demo/**'
7+
- '!docker/**'
8+
- '!tools/**'
49

5-
jobs:
6-
lint:
7-
runs-on: ubuntu-latest
8-
steps:
9-
- uses: actions/checkout@v2
10-
- name: Set up Python 3.7
11-
uses: actions/setup-python@v2
12-
with:
13-
python-version: 3.7
14-
- name: Install pre-commit hook
15-
run: |
16-
pip install pre-commit
17-
pre-commit install
18-
- name: Linting
19-
run: pre-commit run --all-files
20-
- name: Check docstring coverage
21-
run: |
22-
pip install interrogate
23-
interrogate -v --ignore-init-method --ignore-module --ignore-nested-functions --ignore-regex "__repr__" --fail-under 80 mmdet
10+
pull_request:
11+
paths:
12+
- '!demo/**'
13+
- '!docker/**'
14+
- '!tools/**'
15+
- '!docs/**'
16+
- '!docs_zh-CN/**'
2417

18+
jobs:
2519
build_cpu:
2620
runs-on: ubuntu-18.04
2721
strategy:

.github/workflows/lint.yml

+23
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
name: lint
2+
3+
on: [push, pull_request]
4+
5+
jobs:
6+
lint:
7+
runs-on: ubuntu-latest
8+
steps:
9+
- uses: actions/checkout@v2
10+
- name: Set up Python 3.7
11+
uses: actions/setup-python@v2
12+
with:
13+
python-version: 3.7
14+
- name: Install pre-commit hook
15+
run: |
16+
pip install pre-commit
17+
pre-commit install
18+
- name: Linting
19+
run: pre-commit run --all-files
20+
- name: Check docstring coverage
21+
run: |
22+
pip install interrogate
23+
interrogate -v --ignore-init-method --ignore-module --ignore-nested-functions --ignore-regex "__repr__" --fail-under 80 mmdet

0 commit comments

Comments
 (0)