From 814d4dcb8beeef23bcabdbe9b4c65af9027702a5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Damir=20Jeli=C4=87?= Date: Tue, 5 Apr 2022 14:47:24 +0200 Subject: [PATCH] chore(xtask): Check the wasm example when running the wasm tests --- xtask/src/ci.rs | 22 +++++++++++++++++++--- 1 file changed, 19 insertions(+), 3 deletions(-) diff --git a/xtask/src/ci.rs b/xtask/src/ci.rs index 514a7bc91..82a188746 100644 --- a/xtask/src/ci.rs +++ b/xtask/src/ci.rs @@ -62,6 +62,7 @@ enum WasmFeatureSet { MatrixSdkCommon, MatrixSdkCrypto, MatrixSdkIndexeddbStores, + MatrixSdkCommandBot, } impl CiArgs { @@ -211,14 +212,29 @@ fn run_wasm_checks(cmd: Option) -> Result<()> { .run() }; + let test_command_bot = || { + let _p = pushd("crates/matrix-sdk/examples/wasm_command_bot"); + + cmd!("rustup run stable cargo clippy --target wasm32-unknown-unknown") + .args(["--", "-D", "warnings", "-A", "clippy::unused-unit"]) + .run() + }; + match cmd { - Some(cmd) => { - run(args[&cmd])?; - } + Some(cmd) => match cmd { + WasmFeatureSet::MatrixSdkCommandBot => { + test_command_bot()?; + } + _ => { + run(args[&cmd])?; + } + }, None => { for &arg_set in args.values() { run(arg_set)?; } + + test_command_bot()?; } }