name: Tests on: push: branches: [ main ] pull_request: branches: [ main ] jobs: test: runs-on: ${{ matrix.os }} strategy: fail-fast: false matrix: os: [ubuntu-latest, macos-latest] python-version: ["3.10", "3.11", "3.12", "3.13"] steps: - uses: actions/checkout@v4 - name: Set up Python ${{ matrix.python-version }} uses: actions/setup-python@v5 with: python-version: ${{ matrix.python-version }} - name: Install uv uses: astral-sh/setup-uv@v4 with: enable-cache: true - name: Create virtual environment run: uv venv - name: Install dependencies run: | uv pip install -e "." uv pip install pytest pytest-cov pytest-mock - name: Run tests run: | uv run pytest src/nyrag/tests/ -v --tb=short - name: Run tests with coverage if: matrix.python-version == '3.10' && matrix.os == 'ubuntu-latest' run: | uv pip install pytest-cov uv run pytest src/nyrag/tests/ --cov=src/nyrag --cov-report=xml --cov-report=term - name: Upload coverage to Codecov if: matrix.python-version == '3.10' && matrix.os == 'ubuntu-latest' uses: codecov/codecov-action@v4 with: file: ./coverage.xml fail_ci_if_error: false