Skip to content

Merge from main into spiceai #1218

Merge from main into spiceai

Merge from main into spiceai #1218

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@v5
- 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 }}
- run: cargo clippy --all-features -- -D warnings
build:
name: Build (${{ matrix.features }})
runs-on: ubuntu-latest
strategy:
matrix:
features:
- 'no-default-features'
- 'clickhouse'
- 'duckdb'
- 'postgres'
- 'sqlite'
- 'mysql'
- 'flight'
steps:
- uses: actions/checkout@v5
- uses: dtolnay/rust-toolchain@stable
- name: Cache Rust dependencies
uses: Swatinem/rust-cache@v2
- name: Build with ${{ matrix.features }}
run: |
if [ "${{ matrix.features }}" = "no-default-features" ]; then
cargo check --no-default-features
else
cargo check --no-default-features --features ${{ matrix.features }}
fi
integration-test:
name: Tests
runs-on: ubuntu-latest
env:
PG_DOCKER_IMAGE: ghcr.io/cloudnative-pg/postgresql:16-bookworm
MYSQL_DOCKER_IMAGE: public.ecr.aws/ubuntu/mysql:8.0-22.04_beta
steps:
- uses: actions/checkout@v5
- uses: dtolnay/rust-toolchain@stable
- name: Cache Rust dependencies
uses: Swatinem/rust-cache@v2
- name: Pull the Postgres/MySQL images
run: |
docker pull ${{ env.PG_DOCKER_IMAGE }}
docker pull ${{ env.MYSQL_DOCKER_IMAGE }}
- 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 install aptitude -y >/dev/null 2>&1
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
sudo aptitude purge google-cloud-sdk -f -y >/dev/null 2>&1
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
sudo aptitude purge '~n ^dotnet' -f -y >/dev/null 2>&1
sudo apt-get autoremove -y >/dev/null 2>&1
sudo apt-get autoclean -y >/dev/null 2>&1
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: Run tests
run: make test
python-integration-test:
name: Python Tests
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v5
- 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
cargo install --locked --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 .