forked from composefs/composefs-rs
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathJustfile
More file actions
62 lines (47 loc) · 1.9 KB
/
Justfile
File metadata and controls
62 lines (47 loc) · 1.9 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
# Justfile for composefs-rs
# Run `just --list` to see available targets.
# --------------------------------------------------------------------
mod bootc
# Build all crates
build:
cargo build --workspace
# Build in release mode
build-release:
cargo build --workspace --release
# Run unit tests (excludes integration-tests crate)
test:
cargo test --workspace --exclude integration-tests
# Run clippy lints
clippy:
cargo clippy --workspace -- -D warnings
# Run rustfmt check
fmt-check:
cargo fmt --all -- --check
# Format code
fmt:
cargo fmt --all
# Run all checks (clippy + fmt + test)
check: clippy fmt-check test
# Base image for test container builds.
# Override to test on different distros:
# just base_image=ghcr.io/bootcrew/debian-bootc:latest integration-container
base_image := env("COMPOSEFS_BASE_IMAGE", "quay.io/centos-bootc/centos-bootc:stream10")
# Derive test image name from base_image
_test_image := if base_image =~ "debian" { "localhost/composefs-rs-test-debian:latest" } else { "localhost/composefs-rs-test:latest" }
# Run integration tests (builds cfsctl first); pass extra args to the harness
test-integration *ARGS: build
CFSCTL_PATH=$(pwd)/target/debug/cfsctl cargo run -p integration-tests -- {{ ARGS }}
# Run only the fast unprivileged integration tests (no root, no VM)
integration-unprivileged: build
CFSCTL_PATH=$(pwd)/target/debug/cfsctl cargo run -p integration-tests -- --skip privileged_
# Build the test container image for VM-based integration tests
integration-container-build:
podman build --build-arg base_image={{base_image}} -t {{_test_image}} .
# Run all integration tests; privileged tests dispatch to a bcvk VM
integration-container: build integration-container-build
COMPOSEFS_TEST_IMAGE={{_test_image}} \
CFSCTL_PATH=$(pwd)/target/debug/cfsctl \
cargo run -p integration-tests
# Clean build artifacts
clean:
cargo clean