blob: 7df3069fcb2c09fd826e5e5eb4f9ceae0a60ecb8 [file]
name: Lint
on:
pull_request:
branches: [main]
push:
branches: [main]
workflow_dispatch:
permissions:
contents: read
jobs:
ruff:
runs-on: runs-on=${{ github.run_id }}/runner=2cpu-linux-x64/tag=infra
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
persist-credentials: false
- name: Install uv
uses: astral-sh/setup-uv@68559e99cc807c1eb7e9238fd43a15bba460eec2 # v10.3.3
with:
version: "latest-known"
enable-cache: true # enable built-in caching of uv
- name: Install the project and the lint tools
run: uv sync --locked --group lint
- name: Lint with ruff
run: uv run --no-sync ruff check
- name: Check formatting with ruff
run: uv run --no-sync ruff format --check
- name: Check types with pyright
run: uv run --no-sync pyright