您最多选择25个主题
主题必须以中文或者字母或数字开头,可以包含连字符 (-),并且长度不得超过35个字符
46 行
1.1 KiB
46 行
1.1 KiB
name: pre-commit
|
|
|
|
on:
|
|
pull_request:
|
|
push:
|
|
branches: [main]
|
|
|
|
jobs:
|
|
pre-commit:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@v2
|
|
- uses: actions/setup-python@v2
|
|
with:
|
|
python-version: 3.7.x
|
|
- uses: actions/setup-ruby@v1
|
|
with:
|
|
ruby-version: '2.6'
|
|
- uses: actions/setup-dotnet@v1
|
|
with:
|
|
dotnet-version: '3.1.x'
|
|
- name: Install dependencies
|
|
run: |
|
|
python -m pip install --upgrade pip
|
|
pip install pydoc-markdown
|
|
- uses: pre-commit/action@v2.0.0
|
|
|
|
markdown-link-check:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@v2
|
|
- uses: actions/setup-python@v1
|
|
- uses: actions/setup-node@v2-beta
|
|
with:
|
|
node-version: '12'
|
|
- run: sudo npm install -g markdown-link-check
|
|
- uses: pre-commit/action@v2.0.0
|
|
with:
|
|
extra_args: --hook-stage manual markdown-link-check --all-files
|
|
|
|
validate-meta-files:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@v2
|
|
- uses: actions/setup-python@v1
|
|
- run: python utils/validate_meta_files.py
|