Row validation performance improvements and bug fixes (v0.18.0) #149
Workflow file for this run
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: CI | |
| on: | |
| push: | |
| branches: | |
| - master | |
| pull_request: | |
| branches: | |
| - master | |
| jobs: | |
| # Test on all Python versions with minimal dependencies | |
| test: | |
| name: Python ${{ matrix.python-version }} | |
| runs-on: ubuntu-latest | |
| strategy: | |
| matrix: | |
| python-version: ["3.9", "3.10", "3.11", "3.12", "3.13", "3.14"] | |
| steps: | |
| - uses: actions/checkout@v3 | |
| - name: Set up Python ${{ matrix.python-version }} | |
| uses: actions/setup-python@v4 | |
| with: | |
| python-version: ${{ matrix.python-version }} | |
| cache: 'pip' | |
| - name: Install uv | |
| run: | | |
| pip install uv | |
| - name: Install test dependencies | |
| run: | | |
| uv sync --group test | |
| - name: Test with pytest | |
| run: | | |
| uv run pytest tests/ | |
| # Lint and type-check on latest Python only | |
| lint: | |
| name: Lint & Type Check | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v3 | |
| - name: Set up Python 3.13 | |
| uses: actions/setup-python@v4 | |
| with: | |
| python-version: "3.13" | |
| cache: 'pip' | |
| - name: Install uv | |
| run: | | |
| pip install uv | |
| - name: Install dev dependencies | |
| run: | | |
| uv sync --group test --group dev | |
| - name: Lint with Ruff and Pyrefly | |
| run: | | |
| uv run ruff check --output-format=github . | |
| uv run ruff format --diff | |
| uv run pyrefly check . | |
| # Coverage on latest Python only | |
| coverage: | |
| name: Code Coverage | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v3 | |
| - name: Set up Python 3.13 | |
| uses: actions/setup-python@v4 | |
| with: | |
| python-version: "3.13" | |
| cache: 'pip' | |
| - name: Install uv | |
| run: | | |
| pip install uv | |
| - name: Install dev dependencies | |
| run: | | |
| uv sync --group test --group dev | |
| - name: Test with coverage | |
| run: | | |
| uv run pytest --cov --cov-report=xml tests/ | |
| - name: Upload coverage to Codecov | |
| uses: codecov/codecov-action@v5 | |
| with: | |
| files: ./coverage.xml | |
| fail_ci_if_error: false | |
| token: ${{ secrets.CODECOV_TOKEN }} | |
| # Test optional dependencies scenarios with pytest (always passes) | |
| test-optional-deps-pytest: | |
| name: Optional Dependencies (Python ${{ matrix.python-version }}) | |
| runs-on: ubuntu-latest | |
| strategy: | |
| matrix: | |
| python-version: ["3.9", "3.13"] | |
| steps: | |
| - uses: actions/checkout@v3 | |
| - name: Set up Python ${{ matrix.python-version }} | |
| uses: actions/setup-python@v4 | |
| with: | |
| python-version: ${{ matrix.python-version }} | |
| cache: 'pip' | |
| - name: Install uv | |
| run: | | |
| pip install uv | |
| - name: Run optional dependencies tests with both libraries | |
| run: | | |
| uv sync --group test | |
| uv run pytest tests/test_optional_dependencies.py -v | |
| # Test true isolation scenarios (manual script testing) | |
| test-isolation-scenarios: | |
| name: Isolation ${{ matrix.scenario }} (Python ${{ matrix.python-version }}) | |
| runs-on: ubuntu-latest | |
| strategy: | |
| matrix: | |
| python-version: ["3.9", "3.13"] | |
| scenario: ["pandas-only", "polars-only", "both", "pandas-no-pydantic", "none"] | |
| steps: | |
| - uses: actions/checkout@v3 | |
| - name: Set up Python ${{ matrix.python-version }} | |
| uses: actions/setup-python@v4 | |
| with: | |
| python-version: ${{ matrix.python-version }} | |
| cache: 'pip' | |
| - name: Install uv | |
| run: | | |
| pip install uv | |
| - name: Build daffy wheel | |
| run: | | |
| uv build --wheel | |
| - name: Test pandas-only scenario | |
| if: matrix.scenario == 'pandas-only' | |
| run: | | |
| WHEEL=$(ls dist/daffy-*.whl | head -n1) | |
| uv run --no-project --with "pandas>=1.5.1" --with "$WHEEL" python scripts/test_isolated_deps.py pandas | |
| - name: Test polars-only scenario | |
| if: matrix.scenario == 'polars-only' | |
| run: | | |
| WHEEL=$(ls dist/daffy-*.whl | head -n1) | |
| uv run --no-project --with "polars>=1.7.0" --with "$WHEEL" python scripts/test_isolated_deps.py polars | |
| - name: Test both libraries scenario | |
| if: matrix.scenario == 'both' | |
| run: | | |
| WHEEL=$(ls dist/daffy-*.whl | head -n1) | |
| uv run --no-project --with "pandas>=1.5.1" --with "polars>=1.7.0" --with "$WHEEL" python scripts/test_isolated_deps.py both | |
| - name: Test pandas without pydantic scenario | |
| if: matrix.scenario == 'pandas-no-pydantic' | |
| run: | | |
| WHEEL=$(ls dist/daffy-*.whl | head -n1) | |
| uv run --no-project --with "pandas>=1.5.1" --with "$WHEEL" python scripts/test_isolated_deps.py pandas-no-pydantic | |
| - name: Test no libraries scenario (expected to fail gracefully) | |
| if: matrix.scenario == 'none' | |
| run: | | |
| WHEEL=$(ls dist/daffy-*.whl | head -n1) | |
| uv run --no-project --with "$WHEEL" python scripts/test_isolated_deps.py none | |