-
Notifications
You must be signed in to change notification settings - Fork 77
38 lines (31 loc) · 885 Bytes
/
pre-commit.yml
File metadata and controls
38 lines (31 loc) · 885 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
name: Pre Commit Check
"on":
push:
branches: [main]
pull_request:
branches: [main]
jobs:
pre-commit:
runs-on: ubuntu-24.04
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Set up Python 3.11
uses: actions/setup-python@v4
with:
python-version: '3.11'
- name: Create and activate virtual environment
run: |
python3.11 -m venv venv
source venv/bin/activate
echo "VIRTUAL_ENV=$VIRTUAL_ENV" >> $GITHUB_ENV
echo "$VIRTUAL_ENV/bin" >> $GITHUB_PATH
- name: Upgrade pip and install dependencies
run: |
pip install --upgrade pip
pip install -e ".[all]"
pip install pre-commit
- name: Run pre-commit
run: |
SKIP=no-commit-to-branch pre-commit run --all-files
shell: bash