.github/workflows/ci.yml
name: CI
on:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]
env:
CARGO_TERM_COLOR: always
RUST_BACKTRACE: 1
jobs:
build-test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Install stable toolchain
uses: dtolnay/rust-toolchain@stable
- name: Cache cargo
uses: actions/cache@v4
with:
path: |
~/.cargo/registry
~/.cargo/git
target
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
restore-keys: ${{ runner.os }}-cargo-
# CI builds the published `skade-katalog` crate with default features. The
# `skade/` data-plane crate and `bench/` are detached workspaces (own
# [workspace]/lockfiles); their `sql` (DataFusion + C xz) and `s3`/aegir
# (container/network) features stay off so CI is network- and C-dep-light.
- name: Build
run: cargo build --workspace --verbose
- name: Test
run: cargo test --workspace --verbose
# The `skade/` data-plane crate is a DETACHED workspace (own [workspace] +
# lockfile), so `cargo test --workspace` at the repo root never reaches it.
# This matrix builds and tests it directly — default plus each pure-Rust
# feature (lineage / rustfs / sql / testmatrix). The network/C-heavy S3
# backends (`s3`, `aws-s3`, which need a live MinIO) stay out of CI.
skade-test:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
include:
- { name: default, flags: "" }
- { name: lineage, flags: "--features lineage" }
- { name: rustfs, flags: "--features rustfs" }
- { name: sql, flags: "--features sql" }
- { name: testmatrix, flags: "--features testmatrix" }
steps:
- uses: actions/checkout@v4
- name: Install stable toolchain
uses: dtolnay/rust-toolchain@stable
- name: Cache cargo
uses: actions/cache@v4
with:
path: |
~/.cargo/registry
~/.cargo/git
skade/target
key: ${{ runner.os }}-skade-${{ matrix.name }}-${{ hashFiles('skade/Cargo.toml') }}
restore-keys: ${{ runner.os }}-skade-${{ matrix.name }}-
- name: Test skade (${{ matrix.name }})
working-directory: skade
run: cargo test ${{ matrix.flags }} --verbose
lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Install stable toolchain
uses: dtolnay/rust-toolchain@stable
with:
components: clippy, rustfmt
- name: Rustfmt
run: cargo fmt --all -- --check
# Informational: not yet fully clippy-clean, so this does not fail the
# build (no `-D warnings`).
- name: Clippy
run: cargo clippy --workspace --all-targets
continue-on-error: true