Skip to content

Commit b35235b

Browse files
authored
Run pre-commit in a github action (#677)
* Add pre-commit gha workflow * Fix uv-sync pre-commit
1 parent 7d4f483 commit b35235b

File tree

2 files changed

+22
-1
lines changed

2 files changed

+22
-1
lines changed

.github/workflows/pre-commit.yml

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
---
2+
name: "Pre-commit"
3+
on:
4+
pull_request:
5+
push:
6+
branches: [main]
7+
jobs:
8+
pre-commit:
9+
name: Run pre-commit
10+
runs-on: ubuntu-latest
11+
steps:
12+
- uses: actions/checkout@v4
13+
- uses: actions/setup-python@v5
14+
- run: python -m pip install pre-commit
15+
shell: bash
16+
- uses: actions/cache@v4
17+
with:
18+
path: ~/.cache/pre-commit
19+
key: pre-commit-${{ hashFiles('.pre-commit-config.yaml') }}
20+
- run: pre-commit run --show-diff-on-failure --color=always -a
21+
shell: bash

uv.lock

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)