diff --git a/.changelog/unreleased/bug-fixes/770-fix-cargo-test-no-default-features.md b/.changelog/unreleased/bug-fixes/770-fix-cargo-test-no-default-features.md new file mode 100644 index 000000000..ab687989d --- /dev/null +++ b/.changelog/unreleased/bug-fixes/770-fix-cargo-test-no-default-features.md @@ -0,0 +1,2 @@ +- Fix Cargo test failure with `--no-default-features` flag. + ([\#770](https://github.com/cosmos/ibc-rs/issues/770)) diff --git a/.changelog/unreleased/bug-fixes/987-serde-json-feature.md b/.changelog/unreleased/bug-fixes/987-serde-json-feature.md index ee4eed5b0..03b70b888 100644 --- a/.changelog/unreleased/bug-fixes/987-serde-json-feature.md +++ b/.changelog/unreleased/bug-fixes/987-serde-json-feature.md @@ -1,3 +1,3 @@ - Fix dependency resolution by removing the `dep:` syntax in `serde` feature of `ibc-app-transfer` crate. - ([#987](https://github.com/cosmos/ibc-rs/issues/987)) + ([\#987](https://github.com/cosmos/ibc-rs/issues/987)) diff --git a/.github/workflows/rust.yml b/.github/workflows/rust.yml index 6f0e35cd8..d343d327b 100644 --- a/.github/workflows/rust.yml +++ b/.github/workflows/rust.yml @@ -135,3 +135,7 @@ jobs: with: command: test args: --all-features --no-fail-fast --workspace -- --nocapture + - uses: actions-rs/cargo@v1 + with: + command: test + args: --no-default-features --no-fail-fast --no-run diff --git a/ibc-testkit/src/fixtures/clients/tendermint.rs b/ibc-testkit/src/fixtures/clients/tendermint.rs index d64fbd488..03828d78f 100644 --- a/ibc-testkit/src/fixtures/clients/tendermint.rs +++ b/ibc-testkit/src/fixtures/clients/tendermint.rs @@ -165,7 +165,7 @@ pub fn dummy_ics07_header() -> Header { } } -#[cfg(test)] +#[cfg(all(test, feature = "serde"))] mod tests { use ibc::primitives::proto::Any; diff --git a/ibc-testkit/src/lib.rs b/ibc-testkit/src/lib.rs index 1ae269367..b2f737471 100644 --- a/ibc-testkit/src/lib.rs +++ b/ibc-testkit/src/lib.rs @@ -1,5 +1,6 @@ -#![cfg_attr(not(test), deny(clippy::unwrap_used))] #![no_std] +#![forbid(unsafe_code)] +#![cfg_attr(not(test), deny(clippy::unwrap_used))] #![deny( warnings, trivial_casts, @@ -8,7 +9,6 @@ unused_qualifications, rust_2018_idioms )] -#![forbid(unsafe_code)] extern crate alloc; diff --git a/ibc-testkit/src/relayer/context.rs b/ibc-testkit/src/relayer/context.rs index 15faa0d33..4ed1805f1 100644 --- a/ibc-testkit/src/relayer/context.rs +++ b/ibc-testkit/src/relayer/context.rs @@ -49,7 +49,6 @@ mod tests { use ibc::core::client::types::Height; use ibc::core::handler::types::msgs::MsgEnvelope; use ibc::core::host::types::identifiers::ChainId; - use test_log::test; use tracing::debug; use super::RelayerContext; diff --git a/ibc-testkit/src/testapp/ibc/core/types.rs b/ibc-testkit/src/testapp/ibc/core/types.rs index 40b44c34a..e8c6d2972 100644 --- a/ibc-testkit/src/testapp/ibc/core/types.rs +++ b/ibc-testkit/src/testapp/ibc/core/types.rs @@ -793,7 +793,6 @@ mod tests { use ibc::core::primitives::Signer; use ibc::core::router::module::Module; use ibc::core::router::types::module::{ModuleExtras, ModuleId}; - use test_log::test; use super::*; use crate::fixtures::core::channel::PacketConfig; diff --git a/ibc-testkit/tests/applications/mod.rs b/ibc-testkit/tests/applications/mod.rs index 014e52f27..544cab2c5 100644 --- a/ibc-testkit/tests/applications/mod.rs +++ b/ibc-testkit/tests/applications/mod.rs @@ -1 +1,2 @@ +#[cfg(feature = "serde")] pub mod transfer; diff --git a/ibc-testkit/tests/core/ics02_client/mod.rs b/ibc-testkit/tests/core/ics02_client/mod.rs index acab4918d..1a11ad044 100644 --- a/ibc-testkit/tests/core/ics02_client/mod.rs +++ b/ibc-testkit/tests/core/ics02_client/mod.rs @@ -1,3 +1,5 @@ +#[cfg(feature = "serde")] pub mod create_client; pub mod update_client; +#[cfg(feature = "serde")] pub mod upgrade_client; diff --git a/ibc-testkit/tests/core/mod.rs b/ibc-testkit/tests/core/mod.rs index 97dce615a..10f45250e 100644 --- a/ibc-testkit/tests/core/mod.rs +++ b/ibc-testkit/tests/core/mod.rs @@ -1,4 +1,5 @@ pub mod ics02_client; pub mod ics03_connection; pub mod ics04_channel; +#[cfg(feature = "serde")] pub mod router;