-
Notifications
You must be signed in to change notification settings - Fork 9
35 lines (29 loc) · 925 Bytes
/
lint.yml
File metadata and controls
35 lines (29 loc) · 925 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
name: Lint
on: [push, pull_request]
env:
PYTHON_VERSION: "3.12"
jobs:
lint:
name: Lint
runs-on: ubuntu-latest
permissions:
contents: read
steps:
- uses: actions/checkout@v6
- name: Install uv
uses: astral-sh/setup-uv@v8.1.0
with:
enable-cache: true
cache-dependency-glob: uv.lock
python-version: ${{ env.PYTHON_VERSION }}
activate-environment: true
- name: Install Pre-commit
run: uv sync --frozen --only-group ci
- name: Restore pre-commit cache
uses: actions/cache@v5
with:
path: ~/.cache/pre-commit
key: pre-commit-${{ runner.os }}-py${{ env.PYTHON_VERSION }}-${{ hashFiles('.pre-commit-config.yaml') }}
restore-keys: pre-commit-${{ runner.os }}-py${{ env.PYTHON_VERSION }}
- name: Lint
run: pre-commit run --all-files --show-diff-on-failure