name: CI

on:
  push:
    branches: [ main ]
  pull_request:
    branches: [ main ]

  workflow_dispatch:

jobs:
  lint:
    name: lint and style checks
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v4
      - name: Set up Python
        uses: actions/setup-python@v5
        with:
          python-version: "3.12"
      - name: Install dependencies
        run: |
          python -m pip install --upgrade pip
          pip install black black[jupyter] ruff
      - name: Black style check
        run: |
          black --check .
      - name: Lint with ruff
        run: |
          ruff check . --exclude '*.ipynb'
