diff --git a/.github/workflows/iroha2-dev-pr.yml b/.github/workflows/iroha2-dev-pr.yml index bff72e8eac7..28f76f1e25d 100644 --- a/.github/workflows/iroha2-dev-pr.yml +++ b/.github/workflows/iroha2-dev-pr.yml @@ -121,12 +121,12 @@ jobs: --all-features --branch --no-report - name: Generate lcov report - run: cargo llvm-cov report --text --output-path coverage.txt + run: cargo llvm-cov report --lcov --output-path lcov.info - name: Upload lcov report uses: actions/upload-artifact@v4 with: name: report-coverage - path: coverage.txt + path: lcov.info - name: Upload test network artifacts if: failure() && (steps.test_no_features.outcome == 'failure' || steps.test_all_features.outcome == 'failure') uses: actions/upload-artifact@v4 diff --git a/.github/workflows/iroha2-dev-sonar-dojo.yml b/.github/workflows/iroha2-dev-sonar-dojo.yml index 112d744a73d..500261e260d 100644 --- a/.github/workflows/iroha2-dev-sonar-dojo.yml +++ b/.github/workflows/iroha2-dev-sonar-dojo.yml @@ -36,8 +36,9 @@ jobs: with: args: > -Dcommunity.rust.clippy.reportPaths=lints/clippy.json - -Dsonar.cfamily.llvm-cov.reportPath=lints/coverage.txt - -Dsonar.cfamily.gcov.reportsPath=lints/coverage.txt + -Dcommunity.rust.lcov.reportPaths=lints/lcov.info + -Dsonar.cfamily.llvm-cov.reportPath=lints/lcov.info + -Dsonar.cfamily.gcov.reportsPath=lints/lcov.info -Dsonar.pullrequest.key=${{ github.event.workflow_run.pull_requests[0].number }} -Dsonar.pullrequest.base=${{ github.event.workflow_run.pull_requests[0].base.ref }} -Dsonar.pullrequest.branch=${{ github.event.workflow_run.pull_requests[0].head.ref }} diff --git a/crates/iroha/tests/extra_functional/multiple_blocks_created.rs b/crates/iroha/tests/extra_functional/multiple_blocks_created.rs index e99f5bc26fb..96e45f4185d 100644 --- a/crates/iroha/tests/extra_functional/multiple_blocks_created.rs +++ b/crates/iroha/tests/extra_functional/multiple_blocks_created.rs @@ -2,13 +2,10 @@ use std::{num::NonZero, time::Duration}; use eyre::Result; use futures_util::StreamExt; -use iroha::{ - client::{self}, - data_model::{ - events::pipeline::{BlockEventFilter, TransactionEventFilter}, - parameter::BlockParameter, - prelude::*, - }, +use iroha::data_model::{ + events::pipeline::{BlockEventFilter, TransactionEventFilter}, + parameter::BlockParameter, + prelude::*, }; use iroha_test_network::*; use iroha_test_samples::gen_account_in; diff --git a/crates/iroha/tests/extra_functional/normal.rs b/crates/iroha/tests/extra_functional/normal.rs index 198564e51c8..fe30993d34d 100644 --- a/crates/iroha/tests/extra_functional/normal.rs +++ b/crates/iroha/tests/extra_functional/normal.rs @@ -1,8 +1,5 @@ use eyre::Result; -use iroha::{ - client, - data_model::{asset::AssetDefinitionId, parameter::BlockParameter, prelude::*}, -}; +use iroha::data_model::{asset::AssetDefinitionId, parameter::BlockParameter, prelude::*}; use iroha_test_network::*; use nonzero_ext::nonzero; diff --git a/crates/iroha/tests/extra_functional/offline_peers.rs b/crates/iroha/tests/extra_functional/offline_peers.rs index 430b45b6349..d61e5475b1f 100644 --- a/crates/iroha/tests/extra_functional/offline_peers.rs +++ b/crates/iroha/tests/extra_functional/offline_peers.rs @@ -1,7 +1,6 @@ use eyre::{OptionExt, Result}; use futures_util::stream::{FuturesUnordered, StreamExt}; use iroha::{ - client::{self}, crypto::KeyPair, data_model::{ peer::{Peer as DataModelPeer, PeerId}, diff --git a/crates/iroha/tests/extra_functional/restart_peer.rs b/crates/iroha/tests/extra_functional/restart_peer.rs index 7e0091d5e23..e3c934c3b2e 100644 --- a/crates/iroha/tests/extra_functional/restart_peer.rs +++ b/crates/iroha/tests/extra_functional/restart_peer.rs @@ -1,8 +1,5 @@ use eyre::Result; -use iroha::{ - client::{self}, - data_model::prelude::*, -}; +use iroha::data_model::prelude::*; use iroha_test_network::*; use iroha_test_samples::ALICE_ID; use tokio::{task::spawn_blocking, time::timeout}; diff --git a/crates/iroha/tests/extra_functional/unregister_peer.rs b/crates/iroha/tests/extra_functional/unregister_peer.rs index 23c023394cd..c2c40f6d5bd 100644 --- a/crates/iroha/tests/extra_functional/unregister_peer.rs +++ b/crates/iroha/tests/extra_functional/unregister_peer.rs @@ -3,7 +3,6 @@ use std::time::Duration; use assert_matches::assert_matches; use eyre::Result; use iroha::{ - client, client::Client, data_model::{parameter::BlockParameter, prelude::*}, }; diff --git a/crates/iroha/tests/queries/account.rs b/crates/iroha/tests/queries/account.rs index adc64c8156b..c8b19414fb3 100644 --- a/crates/iroha/tests/queries/account.rs +++ b/crates/iroha/tests/queries/account.rs @@ -1,7 +1,7 @@ use std::collections::HashSet; use eyre::Result; -use iroha::{client, data_model::prelude::*}; +use iroha::data_model::prelude::*; use iroha_test_network::*; use iroha_test_samples::{gen_account_in, ALICE_ID}; diff --git a/crates/iroha/tests/queries/mod.rs b/crates/iroha/tests/queries/mod.rs index b6a3f2f356f..4fbd6f0af83 100644 --- a/crates/iroha/tests/queries/mod.rs +++ b/crates/iroha/tests/queries/mod.rs @@ -1,5 +1,5 @@ use iroha::{ - client::{self, QueryError}, + client::QueryError, data_model::{ prelude::*, query::{error::QueryExecutionFail, parameters::MAX_FETCH_SIZE}, diff --git a/crates/iroha/tests/queries/query_errors.rs b/crates/iroha/tests/queries/query_errors.rs index 233b14e5805..c9d02fa2f1b 100644 --- a/crates/iroha/tests/queries/query_errors.rs +++ b/crates/iroha/tests/queries/query_errors.rs @@ -1,6 +1,6 @@ -use iroha::{ - client, - data_model::{prelude::QueryBuilderExt, query::builder::SingleQueryError}, +use iroha::data_model::{ + prelude::{FindAccounts, QueryBuilderExt}, + query::builder::SingleQueryError, }; use iroha_test_network::NetworkBuilder; use iroha_test_samples::gen_account_in; diff --git a/crates/iroha/tests/queries/role.rs b/crates/iroha/tests/queries/role.rs index 37219d8af75..c5ff7cf2e23 100644 --- a/crates/iroha/tests/queries/role.rs +++ b/crates/iroha/tests/queries/role.rs @@ -1,10 +1,7 @@ use std::collections::HashSet; use eyre::Result; -use iroha::{ - client, - data_model::{prelude::*, query::builder::SingleQueryError}, -}; +use iroha::data_model::{prelude::*, query::builder::SingleQueryError}; use iroha_executor_data_model::permission::account::CanModifyAccountMetadata; use iroha_test_network::*; use iroha_test_samples::ALICE_ID; diff --git a/crates/iroha/tests/triggers/by_call_trigger.rs b/crates/iroha/tests/triggers/by_call_trigger.rs index c9f6344c2c0..8c537be33ae 100644 --- a/crates/iroha/tests/triggers/by_call_trigger.rs +++ b/crates/iroha/tests/triggers/by_call_trigger.rs @@ -3,7 +3,6 @@ use std::{sync::mpsc, thread, time::Duration}; use executor_custom_data_model::mint_rose_args::MintRoseArgs; use eyre::{eyre, Result, WrapErr}; use iroha::{ - client::{self}, crypto::KeyPair, data_model::{ prelude::*, diff --git a/crates/iroha/tests/triggers/mod.rs b/crates/iroha/tests/triggers/mod.rs index 7dbe855dd12..e3df3ee3d7e 100644 --- a/crates/iroha/tests/triggers/mod.rs +++ b/crates/iroha/tests/triggers/mod.rs @@ -1,10 +1,9 @@ use assert_matches::assert_matches; use iroha::{ - client, client::Client, data_model::{ asset::{AssetId, AssetValue}, - prelude::{Numeric, QueryBuilderExt}, + prelude::{FindAssets, Numeric, QueryBuilderExt}, }, }; diff --git a/crates/iroha/tests/triggers/time_trigger.rs b/crates/iroha/tests/triggers/time_trigger.rs index 62903a303b4..2d09fe72e24 100644 --- a/crates/iroha/tests/triggers/time_trigger.rs +++ b/crates/iroha/tests/triggers/time_trigger.rs @@ -2,7 +2,7 @@ use std::time::Duration; use eyre::Result; use iroha::{ - client::{self, Client}, + client::Client, data_model::{ asset::AssetId, events::pipeline::{BlockEventFilter, BlockStatus}, diff --git a/crates/iroha/tests/triggers/trigger_rollback.rs b/crates/iroha/tests/triggers/trigger_rollback.rs index 1e1711ce8ac..90226b2e18a 100644 --- a/crates/iroha/tests/triggers/trigger_rollback.rs +++ b/crates/iroha/tests/triggers/trigger_rollback.rs @@ -1,8 +1,5 @@ use eyre::Result; -use iroha::{ - client, - data_model::{prelude::*, trigger::TriggerId}, -}; +use iroha::data_model::{prelude::*, trigger::TriggerId}; use iroha_test_network::*; use iroha_test_samples::ALICE_ID; @@ -36,9 +33,7 @@ fn failed_trigger_revert() -> Result<()> { client.submit_blocking(call_trigger)?; //Then - let query_result = client - .query(FindAssetsDefinitions::new()) - .execute_all()?; + let query_result = client.query(FindAssetsDefinitions::new()).execute_all()?; assert!(query_result .iter() .all(|asset_definition| asset_definition.id() != &asset_definition_id));