Skip to content

Commit cc16ba9

Browse files
committed
add precommit
1 parent d228e0f commit cc16ba9

File tree

1 file changed

+20
-0
lines changed

1 file changed

+20
-0
lines changed

.github/workflows/python-package.yml

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,26 @@ jobs:
4444
run: |
4545
ruff format --check .
4646
47+
precommit_hooks:
48+
runs-on: ubuntu-latest
49+
strategy:
50+
matrix:
51+
cmd:
52+
- "end-of-file-fixer"
53+
- "trailing-whitespace"
54+
- "mixed-line-ending"
55+
steps:
56+
- uses: actions/checkout@v4
57+
58+
- name: Set up Python 3.12
59+
uses: actions/setup-python@v5
60+
with:
61+
python-version: 3.12
62+
63+
- uses: pre-commit/[email protected]
64+
with:
65+
extra_args: ${{ matrix.cmd }} --all-files
66+
4767
test:
4868
runs-on: ubuntu-latest
4969

0 commit comments

Comments
 (0)