name: Run Tox Tests

on:
  push:
    branches:
      - main
  pull_request:

jobs:
  test:
    runs-on: ubuntu-latest
    strategy:
      matrix:
        python-version: ["3.10", "3.11", "3.12", "3.13"]

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

      - name: Set up Python
        uses: actions/setup-python@v4
        with:
          python-version: ${{ matrix.python-version }}

      - name: Install dependencies from project.toml
        run: |
          # Assuming you're using poetry for project management
          pip install poetry
          poetry install

      - name: Install Tox
        run: pip install tox

      - name: Run Tox
        run: tox
