Skip to content

Commit c6f9a79

Browse files
committed
🚀 Added pre-commit config for gh workflow
1 parent 2286aa1 commit c6f9a79

File tree

1 file changed

+31
-0
lines changed

1 file changed

+31
-0
lines changed

.github/workflows/pre-commit.yml

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
name: Pre-commit Checks
2+
3+
on:
4+
push:
5+
branches: [ main ]
6+
pull_request:
7+
branches: [ main ]
8+
9+
jobs:
10+
pre-commit:
11+
runs-on: ubuntu-latest
12+
13+
steps:
14+
- name: Checkout code
15+
uses: actions/checkout@v3
16+
17+
- name: Set up Python 3.10
18+
uses: actions/setup-python@v4
19+
with:
20+
python-version: '3.10'
21+
22+
- name: Install dependencies
23+
run: |
24+
python -m pip install --upgrade pip
25+
# Install pre-commit if not already available in your dependencies
26+
pip install pre-commit
27+
# Optionally install your API package dependencies if needed
28+
if [ -f requirements.txt ]; then pip install -r requirements.txt; fi
29+
30+
- name: Run pre-commit checks
31+
run: pre-commit run

0 commit comments

Comments
 (0)