Skip to content

Commit bba8a40

Browse files
committed
Add pre-commit gha workflow
1 parent 7d4f483 commit bba8a40

File tree

1 file changed

+21
-0
lines changed

1 file changed

+21
-0
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

0 commit comments

Comments
 (0)