Skip to content

Commit 5f8b935

Browse files
authored
Skip CI on ignoring given paths (open-mmlab#1078)
* Skip CI on ignoring given paths Signed-off-by: del-zhenwu <[email protected]> * Fix ignoring path with using Signed-off-by: del-zhenwu <[email protected]>
1 parent 1632798 commit 5f8b935

File tree

2 files changed

+41
-20
lines changed

2 files changed

+41
-20
lines changed

.github/workflows/build.yml

Lines changed: 18 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,27 +1,25 @@
11
name: build
22

3-
on: [push, pull_request]
3+
on:
4+
push:
5+
paths-ignore:
6+
- 'demo/**'
7+
- '.dev/**'
8+
- 'docker/**'
9+
- 'tools/**'
10+
- '**.md'
411

5-
jobs:
6-
lint:
7-
runs-on: ubuntu-18.04
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 --exclude mmseg/ops --ignore-regex "__repr__" --fail-under 80 mmseg
12+
pull_request:
13+
paths-ignore:
14+
- 'demo/**'
15+
- '.dev/**'
16+
- 'docker/**'
17+
- 'tools/**'
18+
- 'docs/**'
19+
- 'docs_zh-CN/**'
20+
- '**.md'
2421

22+
jobs:
2523
build_cpu:
2624
runs-on: ubuntu-18.04
2725
strategy:

.github/workflows/lint.yml

Lines changed: 23 additions & 0 deletions
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-18.04
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 --exclude mmseg/ops --ignore-regex "__repr__" --fail-under 80 mmseg

0 commit comments

Comments
 (0)