Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 7 additions & 10 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,9 @@ on:

env:
CARGO_TERM_COLOR: always
CARGO_INCREMENTAL: "0"
CARGO_PROFILE_DEV_DEBUG: line-tables-only
CARGO_PROFILE_TEST_DEBUG: line-tables-only
RUST_BACKTRACE: 1
RUST_LIB_BACKTRACE: 1

Expand Down Expand Up @@ -59,8 +62,8 @@ jobs:
uses: Swatinem/rust-cache@v2
- name: Clean env
run: pixi run clean-env
- name: Build C++ libs + all Rust test binaries
run: pixi run build-cpp && pixi run build-tests
- name: Build C++ libs
run: pixi run build-cpp
- name: Run C++ and FFI tests
run: pixi run test-cpp
- name: Capture runner state on failure
Expand Down Expand Up @@ -104,8 +107,6 @@ jobs:
uses: Swatinem/rust-cache@v2
- name: Clean env
run: pixi run clean-env
- name: Build all Rust test binaries
run: pixi run build-tests
- name: Run unit tests
run: pixi run test-unit
- name: Capture runner state on failure
Expand Down Expand Up @@ -149,8 +150,8 @@ jobs:
uses: Swatinem/rust-cache@v2
- name: Clean env
run: pixi run clean-env
- name: Build C++ libs (crowdb-diskio subprocess) + all Rust test binaries
run: pixi run build-cpp && pixi run build-tests
- name: Build C++ libs (crowdb-diskio subprocess)
run: pixi run build-cpp
- name: Run server tests
run: pixi run test-server
- name: Capture runner state on failure
Expand Down Expand Up @@ -307,8 +308,6 @@ jobs:
uses: Swatinem/rust-cache@v2
- name: Clean env
run: pixi run clean-env
- name: Build all Rust test binaries + crowdb-kv-server
run: pixi run build-tests
- name: Build crowdb-rpc-fb-server (for bench rpc e2e test)
run: pixi run cmake -S lib/crowdb-rpc -B lib/crowdb-rpc/build -DCMAKE_BUILD_TYPE=Release && pixi run cmake --build lib/crowdb-rpc/build --target crowdb-rpc-fb-server -j
- name: Run console tests
Expand Down Expand Up @@ -355,8 +354,6 @@ jobs:
pixi-version: latest
- name: Cache cargo + target
uses: Swatinem/rust-cache@v2
- name: Build crowdb-kv-server + crowdb-diskdb binaries
run: pixi run build-tests
- name: Install Playwright Chromium (skip if system browser present)
working-directory: app/crowdb-web/ui
run: |
Expand Down
14 changes: 13 additions & 1 deletion .github/workflows/release-container.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,10 @@ concurrency:
jobs:
verify:
runs-on: ubuntu-24.04
env:
CARGO_INCREMENTAL: "0"
CARGO_PROFILE_DEV_DEBUG: line-tables-only
CARGO_PROFILE_TEST_DEBUG: line-tables-only
permissions:
contents: read
outputs:
Expand Down Expand Up @@ -55,6 +59,12 @@ jobs:
env:
CROWDB_PREVIEW_TEST_ARTIFACTS: ${{ runner.temp }}/crowdb-preview-artifacts
run: pixi run test-single-node-container
- name: Free preview build artifacts before acceptance tests
run: |
pixi run docker image rm crowdb-iceberg-single-node:dev
pixi run docker builder prune --all --force
pixi run cargo clean --release
pixi run df -h /
- name: Run S3 client acceptance
run: pixi run clean-env && pixi run -e s3-e2e test-boto3-e2e
- name: Run Iceberg client acceptance
Expand Down Expand Up @@ -129,7 +139,9 @@ jobs:
name: verified-container-runtime
path: target
- name: Extract verified runtime files
run: pixi run bash -euc 'mkdir -p target/container-runtime && tar -C target/container-runtime -xzf target/container-runtime.tar.gz'
run: |
pixi run bash -euc 'mkdir -p target/container-runtime && tar -C target/container-runtime -xzf target/container-runtime.tar.gz'
pixi run rm target/container-runtime.tar.gz
- uses: docker/login-action@v4
with:
username: ${{ vars.DOCKERHUB_USERNAME }}
Expand Down
4 changes: 2 additions & 2 deletions app/crowdb-access-server/tests/iceberg_namespace_sdk_test.rs
Original file line number Diff line number Diff line change
Expand Up @@ -158,10 +158,10 @@ async fn official_catalog_continues_through_empty_namespace_pages() {
})
.await
.unwrap();
assert_eq!(test.store.scans.load(Ordering::SeqCst), 7);
test.finish().await;
assert!(
status.success(),
"official namespace pagination acceptance failed"
);
assert_eq!(test.store.scans.load(Ordering::SeqCst), 7);
test.finish().await;
}
3 changes: 2 additions & 1 deletion doc/working/test.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,8 @@ For test strategy, layer scope, and coverage details, see [`design/kv/design-cro
## Current CI Test Design

CI uses ten parallel jobs, grouped by runtime requirements. Component tasks in
`pixi.toml` select packages with `--all-targets`; group scripts under
`pixi.toml` select library, binary, and integration test targets with
`--tests`; benchmark targets are excluded. Group scripts under
`tools/pixi-tasks/` define execution order. GitHub Actions calls those group
tasks. See [tools/README.md](../../tools/README.md) for the tooling map.

Expand Down
68 changes: 32 additions & 36 deletions pixi.toml
Original file line number Diff line number Diff line change
Expand Up @@ -152,15 +152,11 @@ profile-write = { cmd = "bash tools/profiling/profile-write.sh", depends-on = ["
# ── Test ─────────────────────────────────────────────────────────
# Tasks are grouped by CI job (see doc/working/test.md § "Current CI
# Test Design"). Each group maps 1:1 to a parallel CI job. Run
# `pixi run build-tests` once before any test task to pre-build all
# Rust test binaries; C++ ctest tasks need `pixi run build-cpp`.
# Each test group builds only its own Rust targets. C++ ctest tasks need
# `pixi run build-cpp`.
clean-env = "bash tools/runtime/clean-runtime.sh env"
# Pre-build ALL Rust test binaries + bin targets in one parallel cargo
# invocation. Run this once at the start of a CI job so every subsequent
# `cargo test -p <crate>` step just executes the pre-built binaries
# without recompiling. Also builds the crowdb-kv-server / crowdb-diskdb
# debug binaries that subprocess-spawning tests (crowdb-web, crowdb-console-shared)
# need at target/debug/.
# Optional full-workspace compile check. CI test groups use their component
# tasks to avoid building unrelated test targets on each runner.
build-tests = "cargo test --workspace --all-targets --no-run"
# Verify every workspace package with tests is assigned to a CI test task.
test-task-coverage = "python tools/ci-checks/check-test-task-coverage.py"
Expand All @@ -173,42 +169,42 @@ test-tree-ct = { cmd = "ctest --test-dir lib/crowdb-tree/build --output-on-failu
test-common-ct = { cmd = "lib/crowdb-tree/build/crowdb-common-build/crowdbcommon_tests", depends-on = ["build-cpp"] }
test-rpc-ct = { cmd = "ctest --test-dir lib/crowdb-rpc/build --output-on-failure", depends-on = ["build-cpp"] }
test-diskio-ct = { cmd = "ctest --test-dir app/crowdb-diskio/build --output-on-failure", depends-on = ["build-cpp"] }
test-tree-ffi = { cmd = "cargo test -p crowdb-tree-ffi --all-targets" }
test-rpc-ffi = { cmd = "cargo test -p crowdb-rpc-ffi --all-targets" }
test-tree-ffi = { cmd = "cargo test -p crowdb-tree-ffi --tests" }
test-rpc-ffi = { cmd = "cargo test -p crowdb-rpc-ffi --tests" }
test-cpp = { cmd = "bash tools/pixi-tasks/test-cpp.sh", depends-on = ["build-cpp"] }

# ── UnitTests job: pure Rust, no subprocess spawning ──
test-common = { cmd = "cargo test -p crowdb-common --all-targets" }
test-harness = { cmd = "cargo test -p crowdb-test-harness --all-targets" }
test-protocol = { cmd = "cargo test -p crowdb-protocol --all-targets" }
test-kv-core = { cmd = "cargo test -p crowdb-kv --all-targets" }
test-kv-client = { cmd = "cargo test -p crowdb-kv-client --all-targets" }
test-chunkdb-client = { cmd = "cargo test -p crowdb-chunkdb-client --all-targets" }
test-chunk-kv = { cmd = "cargo test -p crowdb-chunk-kv --all-targets" }
test-chunk-stream = { cmd = "cargo test -p crowdb-chunk-stream --all-targets" }
test-chunk-kv-client = { cmd = "cargo test -p crowdb-chunk-kv-client --all-targets" }
test-chunk-kv-server = { cmd = "cargo test -p crowdb-chunk-kv-server --all-targets" }
test-unit = { cmd = "bash tools/pixi-tasks/test-unit.sh", depends-on = ["build-tests"] }
test-common = { cmd = "cargo test -p crowdb-common --tests" }
test-harness = { cmd = "cargo test -p crowdb-test-harness --tests" }
test-protocol = { cmd = "cargo test -p crowdb-protocol --tests" }
test-kv-core = { cmd = "cargo test -p crowdb-kv --tests" }
test-kv-client = { cmd = "cargo test -p crowdb-kv-client --tests" }
test-chunkdb-client = { cmd = "cargo test -p crowdb-chunkdb-client --tests" }
test-chunk-kv = { cmd = "cargo test -p crowdb-chunk-kv --tests" }
test-chunk-stream = { cmd = "cargo test -p crowdb-chunk-stream --tests" }
test-chunk-kv-client = { cmd = "cargo test -p crowdb-chunk-kv-client --tests" }
test-chunk-kv-server = { cmd = "cargo test -p crowdb-chunk-kv-server --tests" }
test-unit = { cmd = "bash tools/pixi-tasks/test-unit.sh" }

# ── ServerTests job: spawns crowdb-kv-server / crowdb-diskdb / crowdb-diskio ──
test-kv-server = { cmd = "cargo test -p crowdb-kv-server --all-targets" }
test-diskdb = { cmd = "cargo test -p crowdb-diskdb --all-targets" }
test-diskdb-client = { cmd = "cargo build -p crowdb-kv-server -p crowdb-diskdb && cargo test -p crowdb-diskdb-client --all-targets" }
test-chunkdb = { cmd = "cargo test -p crowdb-chunkdb --all-targets" }
test-chunk-client = { cmd = "cargo test -p crowdb-chunk-client --all-targets" }
test-diskio-client = { cmd = "cargo test -p crowdb-diskio-client --all-targets" }
test-access-s3 = { cmd = "cargo test -p crowdb-access-s3 --all-targets" }
test-access-iceberg = { cmd = "cargo test -p crowdb-access-iceberg --all-targets" }
test-access-server = { cmd = "cargo test -p crowdb-access-server --all-targets" }
test-monitor = { cmd = "cargo test -p crowdb-monitor --all-targets" }
test-server = { cmd = "bash tools/pixi-tasks/test-server.sh", depends-on = ["build-tests"] }
test-kv-server = { cmd = "cargo test -p crowdb-kv-server --tests" }
test-diskdb = { cmd = "cargo test -p crowdb-diskdb --tests" }
test-diskdb-client = { cmd = "cargo build -p crowdb-kv-server -p crowdb-diskdb && cargo test -p crowdb-diskdb-client --tests" }
test-chunkdb = { cmd = "cargo test -p crowdb-chunkdb --tests" }
test-chunk-client = { cmd = "cargo test -p crowdb-chunk-client --tests" }
test-diskio-client = { cmd = "cargo test -p crowdb-diskio-client --tests" }
test-access-s3 = { cmd = "cargo test -p crowdb-access-s3 --tests" }
test-access-iceberg = { cmd = "cargo test -p crowdb-access-iceberg --tests" }
test-access-server = { cmd = "cargo test -p crowdb-access-server --tests" }
test-monitor = { cmd = "cargo test -p crowdb-monitor --tests" }
test-server = { cmd = "bash tools/pixi-tasks/test-server.sh" }

# ── ConsoleTests job: spawns crowdb-kv-server via lifecycle::deploy_local ──
# Build the debug binary explicitly so tests find it at target/debug/.
test-console-shared = { cmd = "cargo build -p crowdb-kv-server && cargo test -p crowdb-console-shared --all-targets" }
test-console-cli = { cmd = "cargo test -p crowdb-cli --all-targets" }
test-console-server = { cmd = "cargo build -p crowdb-kv-server && cargo test -p crowdb-web --all-targets" }
test-console = { cmd = "bash tools/pixi-tasks/test-console.sh", depends-on = ["build-tests"] }
test-console-shared = { cmd = "cargo build -p crowdb-kv-server && cargo test -p crowdb-console-shared --tests" }
test-console-cli = { cmd = "cargo test -p crowdb-cli --tests" }
test-console-server = { cmd = "cargo build -p crowdb-kv-server && cargo test -p crowdb-web --tests" }
test-console = { cmd = "bash tools/pixi-tasks/test-console.sh" }

# ── UITests job: Playwright browser E2E + subprocess spawning ──
test-console-ui = { cmd = "bash tools/pixi-tasks/test-console-ui.sh", depends-on = ["install-ui-deps"] }
Expand Down
2 changes: 2 additions & 0 deletions tools/pixi-tasks/test-java-iceberg-e2e.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@ set -euo pipefail
cd "${PIXI_PROJECT_ROOT:?}"

source tools/pixi-tasks/prepare-iceberg.sh
pixi run -e iceberg-e2e -- mvn --batch-mode --no-transfer-progress \
-f app/crowdb-access-server/tests/common/iceberg_java/pom.xml compile exec:help
pixi run -e default -- cargo test --release -p crowdb-access-server --features iceberg-e2e \
--test iceberg_namespace_sdk_test official_catalog_continues_through_empty_namespace_pages -- --ignored --exact
pixi run -e default -- cargo test --release -p crowdb-access-server --features iceberg-e2e \
Expand Down
Loading