-
Notifications
You must be signed in to change notification settings - Fork 11
37 lines (31 loc) · 918 Bytes
/
precommit.yml
File metadata and controls
37 lines (31 loc) · 918 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
name: Run pre-commit
on:
push:
branches:
- dev
pull_request:
workflow_dispatch:
# Cancel if a newer run with the same workflow name is queued
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true
jobs:
test:
name: Run pre-commit
runs-on: "ubuntu-latest"
steps:
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5
name: Check out source-code repository
- name: Set up Python 3.12
uses: actions/setup-python@a26af69be951a213d495a4c3e4e4022e16d87065 # v5
with:
python-version: 3.12
- name: Install uv
uses: astral-sh/setup-uv@v6
- name: Install dependencies
run: |
uv sync --locked --all-extras --dev
- name: Run pre-commit
id: precommit
run: |
uv run pre-commit run --all-files