-
-
Notifications
You must be signed in to change notification settings - Fork 259
35 lines (33 loc) · 930 Bytes
/
pre-commit.yml
File metadata and controls
35 lines (33 loc) · 930 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: Pre-commit
on:
push:
pull_request:
jobs:
pre-commit:
runs-on: ubuntu-latest
name: pre-commit
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Install uv
uses: astral-sh/setup-uv@v5
with:
enable-cache: true
cache-dependency-glob: uv.lock
- name: Setup Python
uses: actions/setup-python@v5
with:
python-version-file: pyproject.toml
- name: Install dependencies
run: uv sync --locked --all-extras --dev && echo "$PWD/.venv/bin" >> $GITHUB_PATH
- name: Check linter
run: ruff check --output-format=github
- name: Check formatter
run: ruff format --check --diff
# keep going even if previous failed
if: '!cancelled()'
- name: Check pyright
if: '!cancelled()'
uses: jakebailey/pyright-action@v2
with:
version: PATH