Skip to content

Commit 2e20401

Browse files
authored
Add pre-commit checks workflow
1 parent 3d03214 commit 2e20401

File tree

1 file changed

+25
-0
lines changed

1 file changed

+25
-0
lines changed

.github/workflows/pre-commit.yml

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
name: Pre-commit Checks
2+
3+
on:
4+
push:
5+
branches: [ main, master, develop ] # 根据您的分支名调整
6+
pull_request:
7+
branches: [ main, master, develop ]
8+
9+
jobs:
10+
pre-commit:
11+
runs-on: ubuntu-latest
12+
steps:
13+
- name: Checkout code
14+
uses: actions/checkout@v4
15+
16+
- name: Set up Python
17+
uses: actions/setup-python@v4
18+
with:
19+
python-version: '3.x' # 指定您的Python版本
20+
21+
- name: Install pre-commit
22+
run: pip install pre-commit
23+
24+
- name: Run pre-commit on all files
25+
run: pre-commit run --all-files

0 commit comments

Comments
 (0)