# check compilation
cargo build --all-targets &&
# fmt, clippy, taplo, doc
dev/rust_lint.sh &&
echo all checks OK
# doc tests
cargo test --doc --features avro,json
( cd datafusion-cli && cargo test --doc --all-features ) &&
# tests
( ulimit -n 2048 && RUST_BACKTRACE=1 cargo test --lib --tests --bins --features avro,json,backtrace ) &&
( cd datafusion-cli && cargo test --lib --tests --bins --all-features ) &&
echo all tests OK
cargo test --test sqllogictests
PostgreSQL CLI for cross-checking behavior
(
set +e -u
container=" tmp-postgres"
docker rm -f " ${container} "
docker run -d --name " ${container} " -e POSTGRES_PASSWORD=mysecretpassword -p 5432:5432 postgres:17 &&
# TODO wait for startup
sleep 5s &&
docker exec -it " ${container} " psql -U postgres -d postgres
docker rm -f " ${container} "
)
Trino CLI for cross-checking behavior
(
set +e -u
container=" tmp-trino"
docker rm -f " ${container} "
docker run -d --name " ${container} " -d trinodb/trino:475 &&
until [ " $( docker inspect -f ' {{.State.Health.Status}}' " ${container} " ) " == " healthy" ]; do
sleep 0.1;
done &&
docker exec -it " ${container} " trino
docker rm -f tmp-trino
)