-
-
Notifications
You must be signed in to change notification settings - Fork 36
30 lines (28 loc) · 823 Bytes
/
precommit.yaml
File metadata and controls
30 lines (28 loc) · 823 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
name: Validate with pre-commit
on:
push:
pull_request:
schedule:
- cron: "0 1 * * SUN"
workflow_dispatch:
jobs:
precommit:
runs-on: "ubuntu-slim"
name: Pre-commit
steps:
- name: Check out the repository
uses: actions/checkout@v6
- name: Setup Python
uses: "actions/setup-python@v6"
with:
python-version: "3.13"
- name: Upgrade pip
run: |
pip install --constraint=.github/workflows/constraints.txt pip
pip --version
- name: Install Python modules
run: |
pip install --constraint=.github/workflows/constraints.txt pre-commit black flake8 reorder-python-imports
- name: Run pre-commit on all files
run: |
pre-commit run --all-files --show-diff-on-failure --color=always