Skip to content

Commit eb6070c

Browse files
committed
adding github ci
1 parent 425e6e2 commit eb6070c

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+
name: pre-commit
2+
3+
on:
4+
pull_request:
5+
push:
6+
branches: [main]
7+
8+
jobs:
9+
pre-commit:
10+
runs-on: ubuntu-latest
11+
steps:
12+
- uses: actions/checkout@v3
13+
- uses: actions/setup-python@v3
14+
- uses: actions/setup-python@v3
15+
- name: Install pre-commit
16+
run: |
17+
pip install pre-commit
18+
- name: Run pre-commit on changed files
19+
run: |
20+
BASE_REF=$(git merge-base origin/main HEAD)
21+
pre-commit run --from-ref $BASE_REF --to-ref HEAD

0 commit comments

Comments
 (0)