Skip to content

Commit b968960

Browse files
committed
Add github action for running pre-commit on ci
1 parent eb2d3aa commit b968960

File tree

1 file changed

+32
-0
lines changed

1 file changed

+32
-0
lines changed
Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
name: Pre-commit Checks
2+
3+
on:
4+
push:
5+
branches: [main]
6+
pull_request:
7+
branches: [main]
8+
workflow_dispatch:
9+
10+
jobs:
11+
pre-commit:
12+
runs-on: ubuntu-latest
13+
steps:
14+
- name: Checkout code
15+
uses: actions/checkout@v4
16+
with:
17+
# Fetch full history for pre-commit hooks that need git history
18+
fetch-depth: 0
19+
20+
- name: Set up Python
21+
uses: actions/setup-python@v4
22+
with:
23+
python-version: '3.13'
24+
25+
- name: Install pre-commit
26+
run: |
27+
python -m pip install --upgrade pip
28+
pip install pre-commit
29+
30+
- name: Run pre-commit on all files
31+
run: |
32+
pre-commit run --all-files

0 commit comments

Comments
 (0)