From 6d61ce323d272711569c38e566462bd4701ec783 Mon Sep 17 00:00:00 2001 From: MusabYK Date: Fri, 4 Sep 2026 17:52:22 +0100 Subject: [PATCH] refactore: ignore slow tests locally during pre-push --- .github/workflows/rust.yml | 2 ++ justfile | 11 ++++++++++- .../tests/functional_tests/bip352_vectors/receive.rs | 11 ++++++++--- 3 files changed, 20 insertions(+), 4 deletions(-) diff --git a/.github/workflows/rust.yml b/.github/workflows/rust.yml index 5e7b965..539d289 100644 --- a/.github/workflows/rust.yml +++ b/.github/workflows/rust.yml @@ -23,6 +23,8 @@ jobs: toolchain: ${{ matrix.rust.version }} - name: Test run: cargo test --no-fail-fast --all-features + - name: Slow Test + run: "cargo test --no-fail-fast --all-features -- --ignored slow::" fmt-clippy: runs-on: ubuntu-latest diff --git a/justfile b/justfile index 0386765..fa28ae2 100644 --- a/justfile +++ b/justfile @@ -3,6 +3,8 @@ alias c := check alias f := fmt alias t := test alias p := pre-push +alias ts := test-slow +alias ta := test-all [doc("List all available commands.")] default: @@ -25,9 +27,16 @@ check: fmt: cargo +nightly fmt -[doc("Run all tests on the workspace with all features")] +[doc("Run fast tests on the workspace with all features (skips tests annotated with #[ignore])")] test: cargo test --workspace --exclude sp_fuzz --exclude bdk_sp_cli_v1 --exclude bdk_sp_cli_v2 --all-features [doc("Run pre-push suite: format, check, and test")] pre-push: fmt check test + +[doc("Run the slow tests that `test`/`pre-push` skip")] +test-slow: + cargo test --workspace --exclude sp_fuzz --exclude bdk_sp_cli_v1 --exclude bdk_sp_cli_v2 --all-features -- --ignored slow:: + +[doc("Run all tests including slow/ignored tests on the workspace with all features")] +test-all: pre-push test-slow \ No newline at end of file diff --git a/silentpayments/tests/functional_tests/bip352_vectors/receive.rs b/silentpayments/tests/functional_tests/bip352_vectors/receive.rs index f66d4c2..674ce5b 100644 --- a/silentpayments/tests/functional_tests/bip352_vectors/receive.rs +++ b/silentpayments/tests/functional_tests/bip352_vectors/receive.rs @@ -273,7 +273,12 @@ fn input_keys_intermediate_sum_is_zero_but_final_sum_is_non_zero() { check_cases(26); } -#[test] -fn maximum_per_group_recipient_limit_k_max_is_exceeded() { - check_cases(27); +mod slow { + use super::*; + + #[test] + #[ignore = "slow test"] + fn maximum_per_group_recipient_limit_k_max_is_exceeded() { + check_cases(27); + } }