Skip to content

Commit 7d87aa4

Browse files
committed
👷 添加 Pre-commit Checks 工作流
1 parent 43bb46f commit 7d87aa4

1 file changed

Lines changed: 25 additions & 0 deletions

File tree

.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: [push]
4+
5+
jobs:
6+
pre-commit:
7+
runs-on: ubuntu-latest
8+
9+
steps:
10+
- name: Checkout code
11+
uses: actions/checkout@v3
12+
13+
- name: Set up Python
14+
uses: actions/setup-python@v3
15+
with:
16+
python-version: '3.12'
17+
18+
- name: Install dependencies
19+
run: |
20+
python -m pip install .
21+
python -m pip install pre-commit
22+
pre-commit install
23+
24+
- name: Run pre-commit
25+
run: pre-commit run --all-files

0 commit comments

Comments
 (0)