diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 4b6a3104..e6435c9f 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -29,7 +29,8 @@ variables: .test: stage: test script: - - cargo test --verbose + - cargo test --verbose --release -- --include-ignored + - cargo test --verbose --no-default-features rustfmt: stage: lint diff --git a/xmpp/Cargo.toml b/xmpp/Cargo.toml index a0221516..676fc368 100644 --- a/xmpp/Cargo.toml +++ b/xmpp/Cargo.toml @@ -25,6 +25,10 @@ tokio-util = { version = "0.7", features = ["codec"] } [dev-dependencies] env_logger = "0.10" +[[example]] +name = "hello_bot" +required-features = ["avatar"] + [features] default = ["avatars"] avatars = [] diff --git a/xmpp/src/lib.rs b/xmpp/src/lib.rs index f5528ad4..956d850d 100644 --- a/xmpp/src/lib.rs +++ b/xmpp/src/lib.rs @@ -576,9 +576,11 @@ mod tests { .set_client(ClientType::Bot, "xmpp-rs") .set_website("https://gitlab.com/xmpp-rs/xmpp-rs") .set_default_nick("bot") - .enable_feature(ClientFeature::Avatars) .enable_feature(ClientFeature::ContactList); + #[cfg(feature = "avatars")] + let client_builder = client_builder.enable_feature(ClientFeature::Avatars); + let mut agent: Agent = client_builder.build_impl(client); while let Some(events) = agent.wait_for_events().await {