Skip to content

Commit

Permalink
Only run wasm integration tests when a feature is enabled (#565)
Browse files Browse the repository at this point in the history
* Add feature flag for running wasm integration tests

* Update CI script to explicitly run wasm integration tests

* Run tests in release mode in CI script

* Update CHANGELOG
  • Loading branch information
ameba23 authored Dec 15, 2023
1 parent 7606831 commit ea06028
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 2 deletions.
4 changes: 3 additions & 1 deletion .circleci/then.yml
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,9 @@ jobs:
yarn
cd ../../..
- run:
command: pushd node && cargo build --all-targets --release -j $(nproc) && cargo test --all-targets --release
command: |
pushd node && cargo build --all-targets --release -j $(nproc) && cargo test --all-targets --release
cargo test -p entropy-tss --release -F wasm_test test_wasm
no_output_timeout: 45m
build-and-release:
machine:
Expand Down
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ At the moment this project **does not** adhere to

### Changed
- Crate name refactor ([#561](https://github.com/entropyxyz/entropy-core/pull/561))
- Only run wasm integration tests when a feature is enabled ([#565](https://github.com/entropyxyz/entropy-core/pull/565))
- Protocol sessions are now identified by a `SessionID` type rather than a `String`
([#549](https://github.com/entropyxyz/entropy-core/pull/549))
- Change bip39 implementation ([#562](https://github.com/entropyxyz/entropy-core/pull/562))
Expand Down
3 changes: 3 additions & 0 deletions crates/threshold-signature-server/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -90,3 +90,6 @@ std =["sp-core/std"]
unsafe =[]
alice =[]
bob =[]
# Enable this feature to run the integration tests for the wasm API of entropy-protocol
# This requires the entropy-protocol node-js module to be built and so is not run by default
wasm_test=[]
5 changes: 4 additions & 1 deletion crates/threshold-signature-server/tests/protocol_wasm.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
#![cfg(feature = "wasm_test")]
//! Integration tests which use a nodejs process to test wasm bindings to the entropy-protocol
//! client functions
//! client functions.
//!
//! These tests require additional build steps and are not run by default.
mod helpers;
use axum::http::StatusCode;
use entropy_kvdb::clean_tests;
Expand Down

0 comments on commit ea06028

Please sign in to comment.