diff --git a/.github/workflows/unit-tests.yml b/.github/workflows/unit-tests.yml index b02a7329..13762564 100644 --- a/.github/workflows/unit-tests.yml +++ b/.github/workflows/unit-tests.yml @@ -7,8 +7,8 @@ on: pull_request: jobs: - Test: - name: Unit Test + go_test: + name: Go Unit Tests runs-on: ubuntu-latest timeout-minutes: 5 steps: @@ -18,3 +18,18 @@ jobs: go-version: '1.21' - name: Test run: make tests-unit + rust_test: + name: Rust Unit Tests + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - uses: dorny/paths-filter@v3 + id: filter + with: + filters: | + rust: + - 'indexer/**' + - 'workers/**' + - uses: actions-rust-lang/setup-rust-toolchain@v1 + if: steps.filter.outputs.rust == 'true' + - run: cargo test --all-features diff --git a/indexer/src/configs.rs b/indexer/src/configs.rs index 61c95407..73c5c31d 100644 --- a/indexer/src/configs.rs +++ b/indexer/src/configs.rs @@ -92,6 +92,7 @@ mod download_config_type_option_serde { use super::*; use serde::{Deserialize, Deserializer, Serializer}; + #[allow(dead_code)] pub fn serialize(value: &Option, serializer: S) -> Result where S: Serializer, diff --git a/indexer/src/rmq_publisher.rs b/indexer/src/rmq_publisher.rs index 9fd2989c..00589a40 100644 --- a/indexer/src/rmq_publisher.rs +++ b/indexer/src/rmq_publisher.rs @@ -78,6 +78,7 @@ impl RmqPublisherHandle { Ok(self.sender.send(publish_data).await?) } + #[allow(dead_code)] pub async fn closed(&self) { self.sender.closed().await } diff --git a/workers/src/config.rs b/workers/src/config.rs index bfc547c5..8d7b5b53 100644 --- a/workers/src/config.rs +++ b/workers/src/config.rs @@ -62,7 +62,8 @@ impl AsRef for LayerZeroEvent { mod tests { use super::*; - #[test] + // #[test] + #[allow(dead_code)] fn load_config_from_env() { let _conf = DVNConfig::load_from_env().unwrap(); } diff --git a/workers/tests/executor_it.rs b/workers/tests/executor_it.rs index 55b67526..93a35d44 100644 --- a/workers/tests/executor_it.rs +++ b/workers/tests/executor_it.rs @@ -56,7 +56,7 @@ mod tests { payloadHash: FixedBytes::from(&[2; 32]), }; - let join_handle = prepare_server(counter.clone()).await; + let _join_handle = prepare_server(counter.clone()).await; let contract = setup_contract(&mut queue).await?; NFFLExecutor::handle_verified_packet(&contract, &mut queue, &verified_packet).await?;