Skip to content

Commit 6e3321d

Browse files
committed
run pre-commit hooks in CI workflow
1 parent 75cf1a6 commit 6e3321d

File tree

2 files changed

+29
-2
lines changed

2 files changed

+29
-2
lines changed

.github/workflows/python-ci.yml

Lines changed: 16 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,10 +21,24 @@ jobs:
2121
with:
2222
python-version: "3.12" # Specify the Python version
2323

24-
- name: Install dependencies
24+
# Install pre-commit
25+
- name: Install pre-commit
2526
run: |
2627
python -m pip install --upgrade pip
27-
pip install -r requirements.txt # Install your project's dependencies
28+
pip install pre-commit
29+
30+
# Install dependencies
31+
- name: Install dependencies
32+
run: |
33+
pip install -r requirements.txt
34+
35+
# Install pre-commit hooks
36+
- name: Install pre-commit hooks
37+
run: pre-commit install
38+
39+
# Run pre-commit hooks
40+
- name: Run pre-commit hooks
41+
run: pre-commit run --all-files # This runs all the hooks on all files
2842

2943
- name: Run tests
3044
run: |

requirements.txt

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,27 @@
1+
black==25.1.0
2+
cfgv==3.4.0
3+
click==8.1.8
14
contourpy==1.3.2
25
cycler==0.12.1
6+
distlib==0.3.9
7+
filelock==3.18.0
38
fonttools==4.57.0
9+
identify==2.6.10
410
iniconfig==2.1.0
511
kiwisolver==1.4.8
612
matplotlib==3.10.1
13+
mypy_extensions==1.1.0
14+
nodeenv==1.9.1
715
numpy==2.2.5
816
packaging==25.0
17+
pathspec==0.12.1
918
pillow==11.2.1
19+
platformdirs==4.3.7
1020
pluggy==1.5.0
21+
pre_commit==4.2.0
1122
pyparsing==3.2.3
1223
pytest==8.3.5
1324
python-dateutil==2.9.0.post0
25+
PyYAML==6.0.2
1426
six==1.17.0
27+
virtualenv==20.30.0

0 commit comments

Comments
 (0)