# This workflow is intended to test against the minimum specified versions in
# pyproject.toml to ensure constraints are adequate.

name: Minimum Dependencies

on:
  push:
    branches: [ "main", "feature/*", "bugfix/*", "maintenance/*" ]
    tags-ignore:
      - "v*.*.*"
  pull_request:
    branches: [ "main" ]

permissions:
  contents: read

jobs:
  test:

    runs-on: ubuntu-latest
    strategy:
      matrix:
        python-version: ["3.13", "3.14"]

    steps:
    - uses: actions/checkout@v6
    - name: Set up Python ${{ matrix.python-version }}
      uses: actions/setup-python@v6
      with:
        python-version: ${{ matrix.python-version }}
    - name: Install lowest versions of dependencies
      run: |
        python -m pip install uv
        uv sync --resolution lowest-direct
    - name: Run test suite against minimum versions
      env:
        UV_RESOLUTION: lowest-direct
      run: |
        uv run poe test
    - name: Publish test suite summary
      uses: ctrf-io/github-test-reporter@v1
      with:
        report-path: './.tests_report.json'
      if: always()
    - name: Build docs with lowest versions of dependencies
      env:
        UV_RESOLUTION: lowest-direct
      run: |
        uv run poe docs
