-
Notifications
You must be signed in to change notification settings - Fork 1
/
justfile
44 lines (35 loc) · 1.64 KB
/
justfile
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
# List all recipes
default:
just --list --unsorted
# Build application
cargo-build:
cargo build --release --locked
# Build binaries
build-binaries:
cargo build --release --locked --target x86_64-unknown-linux-musl
cross build --target aarch64-unknown-linux-musl --release
# Clippy check
cargo-clippy-check:
cargo clippy --release --no-deps --workspace --locked --tests -- -Dwarnings
# Cargo fmt check
cargo-fmt-check:
cargo fmt --all --check
# Create release artifacts
release-artifacts:
mkdir -p artifacts
cp target/x86_64-unknown-linux-musl/release/health-check ./artifacts/health-check-x86_64-unknown-linux-musl
cp target/aarch64-unknown-linux-musl/release/health-check ./artifacts/health-check-aarch64-unknown-linux-musl
# Test 1: Will raise alert to slack
test1:
cargo run --bin health-check -- --app-description "Indexer Raw Processor (k8s Testnet Mainnet)" --task-output-timeout 5 sleep-check -- --stdout-print --output-timeout 10
# Test 2: Will quit.
test2:
# The sleep-check keeps writing to stderr every 6 seconds
# The health-check keeps checking every 5 seconds
cargo run --bin health-check -- --app-description "Indexer Raw Processor (ECS Testnet Mainnet)" --task-output-timeout 5 sleep-check -- --output-timeout 6
# Test 3: Same as test1 but doesn't write to stdout
test3:
cargo run --bin health-check -- --app-description "Indexer Raw Processor (ECS Testnet Mainnet)" --task-output-timeout 5 sleep-check -- --output-timeout 4
# Test 4: Should keep printing. We give high threshold.
test4:
cargo run --bin health-check -- --app-description "Indexer Raw Processor (ECS Testnet Mainnet)" --task-output-timeout 120 sleep-check -- --output-timeout 4