We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 7403a5a commit a6d3652Copy full SHA for a6d3652
.github/workflows/Lint.yml
@@ -0,0 +1,26 @@
1
+name: pre-commit Checks
2
+
3
+on:
4
+ pull_request: # 在 PR 时触发
5
+ push: # 在推送代码到 main/master 分支时触发
6
+ branches: [main, master]
7
8
+jobs:
9
+ pre-commit:
10
+ name: Run pre-commit checks
11
+ runs-on: ubuntu-latest # 使用 Ubuntu 环境
12
13
+ steps:
14
+ - name: Checkout code
15
+ uses: actions/checkout@v4 # 检出代码
16
17
+ - name: Set up Python
18
+ uses: actions/setup-python@v5
19
+ with:
20
+ python-version: "3.10" # 指定 Python 版本
21
22
+ - name: Install pre-commit
23
+ run: pip install pre-commit # 安装 pre-commit
24
25
+ - name: Run pre-commit checks
26
+ run: pre-commit run --all-files # 运行所有检查
0 commit comments