name: Lint

on:
  push:
    branches:
      - "main"
    paths-ignore:
      - 'docs/**'
      - '.github/workflows/docusaurus.yml'
  pull_request:
    branches:
      - "main"
    paths-ignore:
      - 'docs/**'
      - '.github/workflows/docusaurus.yml'

permissions: {}

concurrency:
  group: ${{ github.workflow }}-${{ github.ref }}
  cancel-in-progress: true

jobs:
  ruff:
    name: "Ruff"
    runs-on: "ubuntu-latest"
    steps:
      - name: Checkout the repository
        uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1

      - name: Set up Python
        uses: actions/setup-python@83679a892e2d95755f2dac6acb0bfd1e9ac5d548 # v6.1.0
        with:
          python-version: "3.13"

      - name: Install uv
        uses: astral-sh/setup-uv@681c641aba71e4a1c380be3ab5e12ad51f415867  # v7.1.6
        with:
          version: "0.9.3"

      - name: Install requirements
        run: scripts/setup/bootstrap

      - name: Lint check
        run: scripts/lint-check
