Skip to content

Commit

Permalink
Add runtime-benchmarks feature check into CI (paritytech#793)
Browse files Browse the repository at this point in the history
Signed-off-by: koushiro <[email protected]>
  • Loading branch information
koushiro authored Jul 25, 2022
1 parent 9318023 commit 660779b
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/rust.yml
Original file line number Diff line number Diff line change
Expand Up @@ -79,4 +79,4 @@ jobs:
- name: Rustfmt
run: cargo fmt --all -- --check
- name: Clippy
run: cargo clippy --all -- -D warnings
run: cargo clippy --all --features runtime-benchmarks -- -D warnings
4 changes: 2 additions & 2 deletions frame/evm/src/benchmarking.rs
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ benchmarks! {

}: {

nonce = nonce + 1;
nonce += 1;
let nonce_as_u256: U256 = nonce.into();

let is_transactional = true;
Expand All @@ -125,7 +125,7 @@ benchmarks! {
validate,
T::config(),
);
assert_eq!(call_runner_results.is_ok(), true, "call() failed");
assert!(call_runner_results.is_ok(), "call() failed");
}
}

Expand Down
2 changes: 1 addition & 1 deletion frame/hotfix-sufficients/src/benchmarking.rs
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ benchmarks! {
accounts
.iter()
.for_each(|id| {
assert_eq!(frame_system::Pallet::<T>::sufficients(&id), 1);
assert_eq!(frame_system::Pallet::<T>::sufficients(id), 1);
});
}
}
Expand Down
2 changes: 1 addition & 1 deletion template/runtime/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -835,7 +835,7 @@ impl_runtime_apis! {
list_benchmark!(list, extra, pallet_hotfix_sufficients, PalletHotfixSufficients::<Runtime>);

let storage_info = AllPalletsWithSystem::storage_info();
return (list, storage_info)
(list, storage_info)
}

fn dispatch_benchmark(
Expand Down

0 comments on commit 660779b

Please sign in to comment.