Wire up Iceberg external tables #2454
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: CI | |
on: [push, pull_request] | |
jobs: | |
CI: | |
# Enable pull request trigger only from forks, since otherwise we get 2 job runs in PRs | |
if: | |
github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name != | |
github.repository | |
name: Lint, build, test | |
runs-on: ubuntu-latest | |
env: | |
# set debuginfo to 1 (line tables only, for panic tracebacks) | |
RUSTFLAGS: "-C debuginfo=1" | |
steps: | |
- uses: actions/checkout@v4 | |
# Setup pre-commit | |
- name: Install pre-commit | |
run: | | |
sudo apt-get update | |
sudo apt-get install -y pre-commit | |
- name: Configure pre-commit cache | |
uses: actions/cache@v4 | |
with: | |
path: ~/.cache/pre-commit | |
key: pre-commit-${{ runner.os }}-pre-commit-${{ hashFiles('**/.pre-commit-config.yaml') }} | |
- name: Install protoc | |
run: | | |
mkdir -p $HOME/d/protoc | |
cd $HOME/d/protoc | |
export PROTO_ZIP="protoc-21.4-linux-x86_64.zip" | |
curl -LO https://github.com/protocolbuffers/protobuf/releases/download/v21.4/$PROTO_ZIP | |
unzip $PROTO_ZIP | |
echo "$HOME/d/protoc/bin" >> $GITHUB_PATH | |
export PATH=$PATH:$HOME/d/protoc/bin | |
protoc --version | |
# Use https://github.com/marketplace/actions/rust-cache | |
# selecting a toolchain either by action or manual `rustup` calls should happen | |
# before the plugin, as the cache uses the current rustc version as its cache key | |
- name: Install minimal nightly with clippy and rustfmt | |
uses: dtolnay/rust-toolchain@master | |
with: | |
toolchain: nightly | |
components: rustfmt, clippy | |
- name: Install tool for formatting Cargo.toml files | |
run: cargo install cargo-tomlfmt | |
- uses: Swatinem/rust-cache@v2 | |
with: | |
# shared-key: "" | |
# key: "" | |
# env-vars: "" | |
# workspaces: "" | |
# Determines if the cache should be saved even when the workflow has failed. | |
cache-on-failure: "true" | |
- name: Check pre-commit hooks (formatting and Clippy) | |
run: pre-commit run --all --verbose | |
- name: Build workspace in debug mode | |
run: | | |
cargo build | |
- name: Spin up the test object stores and postgres catalog | |
run: docker compose up -d --wait || true | |
# TODO split tests into unit and integration (one requires postgres?) | |
- name: Run tests | |
run: | | |
cargo test --workspace | |
env: | |
DATABASE_URL: "postgres://postgres:test@localhost:5432/db_test" | |
# TODO recompiles the whole thing with different flags (busting the cache?, | |
# also codecov needs a token for private repos; also this breaks in Docker | |
# because of security / ASLR disable fails) | |
# - name: Run coverage | |
# run: | | |
# cargo install --version 0.20.1 cargo-tarpaulin | |
# cargo tarpaulin --all --out Xml | |
# - name: Report coverage | |
# continue-on-error: true | |
# run: bash <(curl -s https://codecov.io/bash) |