perf: Disable morsel splitting for fast-count on streaming engine #20545
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: Code coverage | |
| on: | |
| pull_request: | |
| paths: | |
| - '**.rs' | |
| - '**.py' | |
| - .github/workflows/test-coverage.yml | |
| push: | |
| branches: | |
| - main | |
| paths: | |
| - '**.rs' | |
| - '**.py' | |
| - .github/workflows/test-coverage.yml | |
| concurrency: | |
| group: ${{ github.workflow }}-${{ github.ref }} | |
| cancel-in-progress: true | |
| defaults: | |
| run: | |
| shell: bash | |
| env: | |
| RUSTFLAGS: '-C instrument-coverage --cfg=coverage --cfg=coverage_nightly --cfg=trybuild_no_target' | |
| RUST_BACKTRACE: 1 | |
| LLVM_PROFILE_FILE: ${{ github.workspace }}/target/polars-%p-%3m.profraw | |
| CARGO_LLVM_COV: 1 | |
| CARGO_LLVM_COV_SHOW_ENV: 1 | |
| CARGO_LLVM_COV_TARGET_DIR: ${{ github.workspace }}/target | |
| # We use the stable ABI, silences error from PyO3 that the system Python is too new. | |
| PYO3_USE_ABI3_FORWARD_COMPATIBILITY: 1 | |
| jobs: | |
| coverage-rust: | |
| # Running under ubuntu doesn't seem to work: | |
| # https://github.com/pola-rs/polars/issues/14255 | |
| runs-on: macos-15 | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - name: Set up Rust | |
| run: rustup component add llvm-tools-preview | |
| - name: Install cargo-llvm-cov | |
| uses: taiki-e/install-action@cargo-llvm-cov | |
| - name: Cache Rust | |
| uses: Swatinem/rust-cache@v2 | |
| with: | |
| save-if: ${{ github.ref_name == 'main' }} | |
| - name: Prepare coverage | |
| run: cargo llvm-cov clean --workspace | |
| - name: Run tests | |
| run: > | |
| cargo test --all-features | |
| -p polars-arrow | |
| -p polars-compute | |
| -p polars-core | |
| -p polars-io | |
| -p polars-lazy | |
| -p polars-ops | |
| -p polars-parquet | |
| -p polars-plan | |
| -p polars-row | |
| -p polars-sql | |
| -p polars-time | |
| -p polars-utils | |
| # Unfortunately we run out of disk space when running integration tests with coverage enabled. | |
| # Skipping for now. | |
| # - name: Run integration tests | |
| # run: cargo test --all-features -p polars --test it | |
| - name: Report coverage | |
| run: cargo llvm-cov report --lcov --output-path coverage-rust.lcov | |
| - name: Upload coverage report | |
| uses: actions/upload-artifact@v6 | |
| with: | |
| name: coverage-rust | |
| path: coverage-rust.lcov | |
| coverage-python: | |
| # Running under ubuntu doesn't seem to work: | |
| # https://github.com/pola-rs/polars/issues/14255 | |
| runs-on: macos-latest | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - name: Set up Python | |
| uses: actions/setup-python@v6 | |
| with: | |
| python-version: '3.12' | |
| check-latest: true | |
| - name: Install uv | |
| run: | | |
| curl -LsSf https://astral.sh/uv/install.sh | sh | |
| echo "$HOME/.local/bin" >> "$GITHUB_PATH" | |
| - name: Create virtual environment | |
| run: | | |
| uv venv | |
| echo "$GITHUB_WORKSPACE/.venv/bin" >> $GITHUB_PATH | |
| echo "VIRTUAL_ENV=$GITHUB_WORKSPACE/.venv" >> $GITHUB_ENV | |
| - name: Install Python dependencies | |
| working-directory: py-polars | |
| run: | | |
| # Install typing-extensions separately whilst the `--extra-index-url` in `requirements-ci.txt` | |
| # doesn't have an up-to-date typing-extensions, see | |
| # https://github.com/astral-sh/uv/issues/6028#issuecomment-2287232150 | |
| uv pip install -U typing-extensions | |
| uv pip install --compile-bytecode -r requirements-dev.txt -r requirements-ci.txt --verbose | |
| - name: Set up Rust | |
| run: rustup component add llvm-tools-preview | |
| - name: Install cargo-llvm-cov | |
| uses: taiki-e/install-action@cargo-llvm-cov | |
| - name: Cache Rust | |
| uses: Swatinem/rust-cache@v2 | |
| with: | |
| save-if: ${{ github.ref_name == 'main' }} | |
| - name: Prepare coverage | |
| run: cargo llvm-cov clean --workspace | |
| - name: Install Polars | |
| run: | | |
| # Make sure we use the Polars we're about to build. | |
| uv pip uninstall polars-runtime-32 polars-runtime-64 polars-runtime-compat | |
| uv pip install --no-deps -e py-polars | |
| make build | |
| - name: Run Python tests | |
| working-directory: py-polars | |
| env: | |
| POLARS_TIMEOUT_MS: 60000 | |
| run: > | |
| pytest | |
| -n auto | |
| -m "not release and not benchmark and not docs" | |
| -k 'not test_polars_import' | |
| --cov --cov-report xml:main.xml --cov-fail-under=0 | |
| - name: Run Python tests - streaming | |
| working-directory: py-polars | |
| env: | |
| POLARS_AUTO_NEW_STREAMING: 1 | |
| POLARS_TIMEOUT_MS: 60000 | |
| run: > | |
| pytest | |
| -n auto | |
| -m "not may_fail_auto_streaming and not slow and not write_disk and not release and not docs and not hypothesis and not benchmark and not ci_only" | |
| -k 'not test_polars_import' | |
| --cov --cov-report xml:main.xml --cov-fail-under=0 | |
| - name: Run Python tests - async reader | |
| working-directory: py-polars | |
| env: | |
| POLARS_FORCE_ASYNC: 1 | |
| POLARS_TIMEOUT_MS: 60000 | |
| run: > | |
| pytest tests/unit/io/ | |
| -n auto | |
| -m "not release and not benchmark and not docs" | |
| --cov --cov-report xml:async.xml --cov-fail-under=0 | |
| - name: Report Rust coverage | |
| run: cargo llvm-cov report --lcov --output-path coverage-python.lcov | |
| - name: Upload coverage reports | |
| uses: actions/upload-artifact@v6 | |
| with: | |
| name: coverage-python | |
| path: | | |
| coverage-python.lcov | |
| py-polars/main.xml | |
| py-polars/async.xml | |
| upload-coverage: | |
| needs: [coverage-rust, coverage-python] | |
| runs-on: ubuntu-latest | |
| steps: | |
| # Needed to fetch the Codecov config file | |
| - uses: actions/checkout@v6 | |
| - name: Download coverage reports | |
| uses: actions/download-artifact@v7 | |
| with: | |
| merge-multiple: true | |
| - name: Upload coverage reports | |
| uses: codecov/codecov-action@v5 | |
| with: | |
| token: ${{ secrets.CODECOV_TOKEN }} | |
| files: coverage-rust.lcov,coverage-python.lcov,py-polars/main.xml,py-polars/async.xml | |
| root_dir: ${{ github.workspace }} |