Skip to content

Python(refactor): update exports.proto to support parquet #2306

Python(refactor): update exports.proto to support parquet

Python(refactor): update exports.proto to support parquet #2306

Workflow file for this run

name: rust-ci
on:
release:
types: [created]
pull_request:
push:
branches:
- main
paths:
- 'rust/**'
- 'Cargo.toml'
- 'Cargo.lock'
- 'dist-workspace.toml'
- '.github/workflows/rust_ci.yaml'
workflow_call:
inputs:
ref:
description: "Git ref (tag or sha) to check out and test"
required: false
type: string
permissions:
contents: read
pull-requests: read
jobs:
changes:
if: github.event_name == 'pull_request'
runs-on: ubuntu-latest
outputs:
rust: ${{ steps.filter.outputs.rust }}
steps:
- uses: actions/checkout@v4
- uses: dorny/paths-filter@v3
id: filter
with:
filters: |
rust:
- 'rust/**'
- 'Cargo.toml'
- 'Cargo.lock'
- 'dist-workspace.toml'
- '.github/workflows/rust_ci.yaml'
lint-rust:
needs: [changes]
if: |
always() &&
(github.event_name != 'pull_request' || needs.changes.outputs.rust == 'true')
runs-on: ubuntu-latest
steps:
- name: Checkout sources
uses: actions/checkout@v4
with:
ref: ${{ inputs.ref || github.sha }}
- name: Install stable toolchain
uses: dtolnay/rust-toolchain@stable
with:
components: clippy, rustfmt
- name: Run cargo check
run: cargo check --all-features
- name: Run cargo clippy
run: cargo clippy --all-features
- name: Run cargo fmt
run: cargo fmt --check --all
- name: Run cargo test
run: cargo test --all-features
- name: Run sift-stream-bindings lint & test
shell: bash
run: |
set -e
python3 -m venv .venv
source .venv/bin/activate
pip install maturin pytest pytest-asyncio ruff
cd rust/crates/sift_stream_bindings
maturin develop --release
ruff check sift_stream_bindings.pyi
pytest tests
rust-ci-status:
if: always()
needs: [changes, lint-rust]
runs-on: ubuntu-latest
steps:
- name: Check result
run: |
result="${{ needs.lint-rust.result }}"
if [[ "$result" == "success" || "$result" == "skipped" ]]; then
echo "rust-ci passed (lint-rust: $result)"
else
echo "rust-ci failed (lint-rust: $result)"
exit 1
fi