Skip to content

Bump cryptography from 48.0.1 to 50.0.0 in /python in the uv group across 1 directory #1831

Bump cryptography from 48.0.1 to 50.0.0 in /python in the uv group across 1 directory

Bump cryptography from 48.0.1 to 50.0.0 in /python in the uv group across 1 directory #1831

Workflow file for this run

---
name: pr
on:
pull_request:
branches:
- main
- spiceai
jobs:
lint:
name: Clippy
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v7
- uses: dtolnay/rust-toolchain@stable
with:
components: rustfmt, clippy
- name: Cache Rust dependencies
uses: Swatinem/rust-cache@v2
- name: Install Protoc
uses: arduino/setup-protoc@v3
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}
- name: Check formatting
run: cargo fmt --all -- --check
- run: cargo clippy --workspace --all-features -- -D warnings
build:
name: Build (facade all-features)
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v7
- uses: dtolnay/rust-toolchain@stable
- name: Cache Rust dependencies
uses: Swatinem/rust-cache@v2
- name: Install Protoc
uses: arduino/setup-protoc@v3
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}
- name: Install ODBC
run: sudo apt-get install -y unixodbc-dev
- name: Check facade with all features
run: cargo check -p datafusion-table-providers --all-features
leaf-crates:
name: Leaf (${{ matrix.crate }})
runs-on: ubuntu-latest
strategy:
matrix:
crate:
- datafusion-table-providers-common
- datafusion-table-providers-adbc
- datafusion-table-providers-clickhouse
- datafusion-table-providers-duckdb
- datafusion-table-providers-flightsql
- datafusion-table-providers-mongodb
- datafusion-table-providers-mysql
- datafusion-table-providers-odbc
- datafusion-table-providers-postgres
- datafusion-table-providers-sqlite
steps:
- uses: actions/checkout@v7
- uses: dtolnay/rust-toolchain@stable
- name: Cache Rust dependencies
uses: Swatinem/rust-cache@v2
- name: Install Protoc
uses: arduino/setup-protoc@v3
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}
- name: Install ODBC
if: matrix.crate == 'datafusion-table-providers-odbc'
run: sudo apt-get install -y unixodbc-dev
- name: Check ${{ matrix.crate }}
run: cargo check -p ${{ matrix.crate }}
unit-test:
name: Unit Tests
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v7
- uses: dtolnay/rust-toolchain@stable
- name: Cache Rust dependencies
uses: Swatinem/rust-cache@v2
- name: Install Protoc
uses: arduino/setup-protoc@v3
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}
- name: Install ODBC & Sqlite
run: |
sudo apt-get install -y unixodbc-dev libsqlite3-dev
- name: Run unit tests
run: make test
integration-test:
name: Integration Tests
runs-on: ubuntu-latest
timeout-minutes: 25
env:
# Official Postgres image — CNPG variants can exceed the healthcheck window in CI.
PG_DOCKER_IMAGE: postgres:16
MYSQL_DOCKER_IMAGE: mysql:8.0
CLICKHOUSE_DOCKER_IMAGE: clickhouse/clickhouse-server:24.8
# Keep integration test logs concise for faster CI runs.
RUST_LOG: info
# Serialize Docker-backed tests a bit to avoid stampeding many Postgres containers.
RUST_TEST_THREADS: "4"
steps:
- uses: actions/checkout@v7
- uses: dtolnay/rust-toolchain@stable
- name: Cache Rust dependencies
uses: Swatinem/rust-cache@v2
# Free space before pulling images so we do not delete the images we need.
- name: Free Disk Space
run: |
sudo rm -rf \
/usr/share/dotnet /usr/local/lib/android /opt/ghc \
/usr/local/share/powershell /usr/share/swift /usr/local/.ghcup \
/usr/lib/jvm || true
sudo docker system prune -af >/dev/null 2>&1 || true
df -h
- name: Cache Docker images
id: docker-cache
uses: actions/cache@v6
with:
path: /tmp/docker-images
key: docker-images-${{ env.PG_DOCKER_IMAGE }}-${{ env.MYSQL_DOCKER_IMAGE }}-${{ env.CLICKHOUSE_DOCKER_IMAGE }}
- name: Load or pull Docker images
run: |
mkdir -p /tmp/docker-images
load_or_pull() {
local name="$1"
local image="$2"
local tar="/tmp/docker-images/${name}.tar"
if [ -f "$tar" ]; then
echo "Loading cached $image..."
docker load -i "$tar"
else
echo "Pulling $image..."
docker pull "$image"
docker save -o "$tar" "$image"
fi
}
load_or_pull postgres "${{ env.PG_DOCKER_IMAGE }}"
load_or_pull mysql "${{ env.MYSQL_DOCKER_IMAGE }}"
load_or_pull clickhouse "${{ env.CLICKHOUSE_DOCKER_IMAGE }}"
- name: Install ODBC & Sqlite
run: |
sudo apt-get update
sudo apt-get install -y unixodbc-dev libsqlite3-dev
- name: Install ADBC drivers
run: |
curl -LsSf https://dbc.columnar.tech/install.sh | sh
echo "$HOME/.local/bin" >> "$GITHUB_PATH"
export PATH="$HOME/.local/bin:$PATH"
dbc install sqlite
dbc install duckdb
ls -la "${XDG_CONFIG_HOME:-$HOME/.config}/adbc/drivers" || true
- name: Run integration tests
run: make test-integration
python-integration-test:
name: Python Tests
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v7
- uses: dtolnay/rust-toolchain@stable
- name: Cache Rust dependencies
uses: Swatinem/rust-cache@v2
- uses: astral-sh/setup-uv@v7
with:
enable-cache: true
cache-dependency-glob: |
python/pyproject.toml
python/uv.lock
- name: Install ODBC, Sqlite and Roapi
run: |
sudo apt-get install -y unixodbc-dev libsqliteodbc libsqlite3-dev
# 0.13.0 musl release panics on HTTP UI route registration; 0.12.7 is fine.
curl -fsSL -o /tmp/roapi.tar.gz \
https://github.com/roapi/roapi/releases/download/roapi-v0.12.7/roapi-x86_64-unknown-linux-musl.tar.gz
sudo tar -xzf /tmp/roapi.tar.gz -C /usr/local/bin roapi
sudo chmod +x /usr/local/bin/roapi
roapi --help >/dev/null
- name: Build Python package and run tests
working-directory: python
run: |
uv sync --dev --no-install-project --no-install-package datafusion
uv run --no-project maturin develop --uv
uv run --no-project pytest -v python/tests