name: 🧹 Lint with Ruff

on:
  pull_request:
    branches:
      - main
      - v*.*.*
      - epic-*

jobs:
  ruff-lint:
    runs-on: ubuntu-latest

    steps:
      - name: Checkout repo
        uses: actions/checkout@v4

      - name: Install latest Rust stable
        uses: dtolnay/rust-toolchain@stable

      - name: Set up Python
        uses: actions/setup-python@v4
        with:
          python-version: "3.12"

      - name: Install dependencies
        run: |
          python -m pip install --upgrade pip
          python -m pip install ruff
          pip install .

      - name: Lint with Ruff
        run: ruff check --output-format=github nucypher
