name: py-bc-configs

on:
  pull_request:
  push:
    branches:
      - main

jobs:
  lint:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v4

      - name: Install uv
        uses: astral-sh/setup-uv@v5
        with:
          enable-cache: true

      - name: "Set up Python"
        uses: actions/setup-python@v5
        with:
          python-version-file: ".python-version"
          enable-cache: true

      - name: Install the project
        run: uv sync --locked --all-extras --dev

      - name: Run ruff
        run: uv run ruff check .

      - name: Run coverage
        run: |
          uv run pytest --cov=src --cov-report=xml

      - name: Run mypy
        run: uv run mypy .
