Skip to content

Commit 33dfdb9

Browse files
Create pre-commit.yml
1 parent f0a4a27 commit 33dfdb9

File tree

1 file changed

+32
-0
lines changed

1 file changed

+32
-0
lines changed

.github/workflows/pre-commit.yml

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
name: pre-commit
2+
3+
on:
4+
workflow_dispatch:
5+
6+
jobs:
7+
pre-commit-test:
8+
runs-on: ubuntu-latest
9+
10+
steps:
11+
- name: Checkout repository
12+
uses: actions/checkout@v2
13+
14+
- name: Set up Python 3.11
15+
uses: actions/setup-python@v2
16+
with:
17+
python-version: 3.11
18+
19+
- name: Install dependencies
20+
run: python -m pip install --upgrade pip
21+
22+
- name: Cache pre-commit hooks
23+
uses: actions/cache@v2
24+
with:
25+
path: ~/.cache/pre-commit
26+
key: ${{ runner.os }}-precommit-${{ hashFiles('.pre-commit-config.yaml') }}
27+
28+
- name: Install pre-commit
29+
run: python -m pip install pre-commit
30+
31+
- name: Run pre-commit with debug
32+
run: pre-commit run --all-files

0 commit comments

Comments
 (0)