[CI] Skip build CI if only configs or docs modification. (#575)
* [CI] Skip build CI if only configs or docs modification. * Use ubuntu latestpull/571/head^2
parent
9d9dce69ad
commit
33f049b4c2
|
@ -1,26 +1,32 @@
|
|||
# This workflow will install Python dependencies, run tests and lint with a variety of Python versions
|
||||
# This workflow will install Python dependencies, run tests with a variety of Python versions
|
||||
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-python-with-github-actions
|
||||
|
||||
name: build
|
||||
|
||||
on: [push, pull_request]
|
||||
on:
|
||||
push:
|
||||
paths-ignore:
|
||||
- 'README.md'
|
||||
- 'README_zh-CN.md'
|
||||
- 'model-index.yml'
|
||||
- 'docs/**'
|
||||
- 'docs_zh-CN/**'
|
||||
- 'configs/**.md'
|
||||
- 'demo/**'
|
||||
- '.dev_scripts/**'
|
||||
|
||||
pull_request:
|
||||
paths-ignore:
|
||||
- 'README.md'
|
||||
- 'README_zh-CN.md'
|
||||
- 'model-index.yml'
|
||||
- 'docs/**'
|
||||
- 'docs_zh-CN/**'
|
||||
- 'configs/**.md'
|
||||
- 'demo/**'
|
||||
- '.dev_scripts/**'
|
||||
|
||||
jobs:
|
||||
lint:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- name: Set up Python 3.7
|
||||
uses: actions/setup-python@v1
|
||||
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
|
||||
|
||||
build_without_timm:
|
||||
runs-on: ubuntu-latest
|
||||
env:
|
||||
|
|
|
@ -0,0 +1,21 @@
|
|||
# This workflow will run lint
|
||||
|
||||
name: lint
|
||||
|
||||
on: [push, pull_request]
|
||||
|
||||
jobs:
|
||||
lint:
|
||||
runs-on: ubuntu-latest
|
||||
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
|
Loading…
Reference in New Issue