mirror of
https://gitlab.com/xmpp-rs/xmpp-rs.git
synced 2024-07-12 22:21:53 +00:00
CI: Add a test with no-default-features and ensure it passes
Signed-off-by: Maxime “pep” Buquet <pep@bouah.net>
This commit is contained in:
parent
34467dd4a6
commit
2e3004f89e
3 changed files with 9 additions and 2 deletions
|
@ -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
|
||||
|
|
|
@ -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 = []
|
||||
|
|
|
@ -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 {
|
||||
|
|
Loading…
Reference in a new issue