Skip to content

Bump rand from 0.10.1 to 0.10.2 #1796

Bump rand from 0.10.1 to 0.10.2

Bump rand from 0.10.1 to 0.10.2 #1796

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 }}
integration-test:
name: Tests
runs-on: ubuntu-latest
env:
PG_DOCKER_IMAGE: ghcr.io/cloudnative-pg/postgresql:16-bookworm
MYSQL_DOCKER_IMAGE: mysql:8.0
steps:
- uses: actions/checkout@v7
- uses: dtolnay/rust-toolchain@stable
- name: Cache Rust dependencies
uses: Swatinem/rust-cache@v2
- 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 }}
- name: Load or pull Docker images
run: |
if [ -f /tmp/docker-images/postgres.tar ] && [ -f /tmp/docker-images/mysql.tar ]; then
echo "Loading cached Docker images..."
docker load -i /tmp/docker-images/postgres.tar
docker load -i /tmp/docker-images/mysql.tar
else
echo "Pulling Docker images..."
docker pull ${{ env.PG_DOCKER_IMAGE }}
docker pull ${{ env.MYSQL_DOCKER_IMAGE }}
mkdir -p /tmp/docker-images
docker save -o /tmp/docker-images/postgres.tar ${{ env.PG_DOCKER_IMAGE }}
docker save -o /tmp/docker-images/mysql.tar ${{ env.MYSQL_DOCKER_IMAGE }}
fi
- name: Free Disk Space
run: |
sudo docker rmi $(docker image ls -aq) >/dev/null 2>&1 || true
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
echo "some directories deleted"
sudo apt-get update >/dev/null 2>&1
sudo apt install aptitude -y >/dev/null 2>&1 || true
sudo aptitude purge aria2 ansible azure-cli shellcheck rpm xorriso zsync \
esl-erlang firefox gfortran-8 gfortran-9 google-chrome-stable \
google-cloud-sdk imagemagick \
libmagickcore-dev libmagickwand-dev libmagic-dev ant ant-optional kubectl \
mercurial apt-transport-https mono-complete libmysqlclient \
yarn chrpath libssl-dev libxft-dev \
libfreetype6 libfreetype6-dev libfontconfig1 libfontconfig1-dev \
snmp pollinate libpq-dev postgresql-client powershell ruby-full \
sphinxsearch subversion mongodb-org azure-cli microsoft-edge-stable \
-y -f >/dev/null 2>&1 || true
sudo aptitude purge google-cloud-sdk -f -y >/dev/null 2>&1 || true
sudo aptitude purge microsoft-edge-stable -f -y >/dev/null 2>&1 || true
sudo apt purge microsoft-edge-stable -f -y >/dev/null 2>&1 || true
sudo aptitude purge '~n ^php' -f -y >/dev/null 2>&1 || true
sudo aptitude purge '~n ^dotnet' -f -y >/dev/null 2>&1 || true
sudo apt-get autoremove -y >/dev/null 2>&1 || true
sudo apt-get autoclean -y >/dev/null 2>&1 || true
echo "some packages purged"
df -h
- name: Install ODBC & Sqlite
run: |
sudo apt-get install -y unixodbc-dev
sudo apt-get install -y libsqlite3-dev
- name: Install ADBC drivers
run: |
curl -LsSf https://dbc.columnar.tech/install.sh | sh
dbc install sqlite
dbc install duckdb
- name: Compile integration tests
run: |
cargo test -p datafusion-table-providers --no-run --test integration --no-default-features --features postgres,sqlite,mysql,flight,clickhouse,adbc
- name: Run tests
run: make test
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
with:
workspaces: |
.
python
- uses: astral-sh/setup-uv@v7
with:
enable-cache: true
cache-dependency-glob: 'python/pyproject.toml'
- name: Install ODBC, Sqlite and Roapi
run: |
sudo apt-get install -y unixodbc-dev libsqliteodbc
sudo apt-get install -y libsqlite3-dev
RUSTUP_TOOLCHAIN=stable cargo install --git https://github.com/roapi/roapi --branch main --bins roapi
- name: Build Python package and run tests
run: |
cd python
uv sync --dev --no-install-package datafusion
uv run --no-project maturin develop --uv --release
cd python/tests
uv run --no-project pytest -v .