-
Notifications
You must be signed in to change notification settings - Fork 1.7k
36 lines (33 loc) · 964 Bytes
/
pre-commit.yml
File metadata and controls
36 lines (33 loc) · 964 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
name: pre-commit
permissions:
contents: read
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.id }}
cancel-in-progress: true
on:
pull_request:
branches: ["main"]
push:
# Note even though this job is called "pre-commit" and runs "pre-commit", this job will run
# also POST-commit on main also! In case there are mishandled merge conflicts / bad auto-resolves
# when merging into main branch.
branches: ["main"]
jobs:
pre-commit:
timeout-minutes: 30
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-tags: true
fetch-depth: 0
- uses: ./.github/actions/setup_build_env
with:
python-version: 3.14
run-uv-sync: true
- uses: actions/checkout@v4
with:
clean: false
fetch-tags: true
fetch-depth: 0
- run: uv run pre-commit run --all-files --show-diff-on-failure