name: CI

on:
  pull_request:
    paths_ignore:
      - "docs/**"

  push:
    branches:
      - main

    paths_ignore:
      - "docs/**"


jobs:
  tests:
    name: Python ${{ matrix.python-version }}
    runs-on: ubuntu-latest
    strategy:
      matrix:
        python-version:
          - "3.12"
          - "3.13"

    steps:
      - uses: actions/checkout@v4
      - name: Setup Python ${{ matrix.python-version }}
        uses: actions/setup-python@v5
        with:
          python-version: ${{ matrix.python-version }}

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

      - name: Install deps
        run: |
          uv sync --all-extras --dev

      - name: run tests
        run: |
          uv run pytest --cov --cov-branch --cov-report=xml


#      - name: Upload coverage reports to Codecov
#        uses: codecov/codecov-action@v5
#        with:
#          token: ${{ secrets.CODECOV_TOKEN }}


  lint:
    name: linting and formatting
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v4
      - uses: astral-sh/ruff-action@v3


  type_check:
    name: type checking
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v4
      - uses: actions/setup-python@v5
        with:
          python-version: 3.13

      - uses: astral-sh/setup-uv@v5
        with:
          enable-cache: true
      - name: Install deps
        run: |
          uv sync --all-extras --dev

      - name: Run checks
        run: uv run mypy signals


