name: Lint

on:
  push:
    branches: ["main"]
    paths:
      - '**.py'
  pull_request:
    paths:
      - '**.py'

jobs:
  lint:
    runs-on: ubuntu-slim
    steps:
      - uses: actions/checkout@v6

      - uses: astral-sh/ruff-action@v3

      - name: format
        run: ruff format --diff

      - name: lint
        run: ruff check --diff
