diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 8eebbad..92dc79c 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -71,8 +71,8 @@ jobs: - name: Setup rust toolchain run: rustup show - uses: Swatinem/rust-cache@v1.3.0 - - run: cargo build --bins --tests - - run: cargo test --workspace + - run: cargo build --features expensive_tests --bins --tests + - run: cargo test --workspace --features expensive_tests - name: Smoke test ${{ matrix.os }} binary shell: bash run: | diff --git a/daemon/Cargo.toml b/daemon/Cargo.toml index e72fd65..a0c3114 100644 --- a/daemon/Cargo.toml +++ b/daemon/Cargo.toml @@ -44,6 +44,10 @@ uuid = { version = "0.8", features = ["serde", "v4"] } xtra = { version = "0.6", features = ["with-tokio-1"] } xtra_productivity = { path = "../xtra_productivity" } +[features] +# Feature flag to enable tests that take longer to compile. +expensive_tests = [] + [[bin]] name = "taker" path = "src/taker.rs" diff --git a/daemon/tests/happy_path.rs b/daemon/tests/happy_path.rs index b3afe45..2829f3d 100644 --- a/daemon/tests/happy_path.rs +++ b/daemon/tests/happy_path.rs @@ -87,6 +87,7 @@ fn mock_wallet_sign_and_broadcast(wallet: &mut MutexGuard<'_, harness::mocks::wa } #[tokio::test] +#[cfg_attr(not(feature = "expensive_tests"), ignore)] async fn taker_takes_order_and_maker_accepts_and_contract_setup() { let _guard = init_tracing(); let (mut maker, mut taker) = start_both().await;