Check docs and run clippy on PRs (#326)

* Check docs, clippy, test run

* test parallel CI adapted from other package; is it faster?

* Remember to download substrate

* Nightly for cargo fmt

* Standardise CI names

* fix clippy complaints

* Ensure docs are valid and export publicly accessible types

* all-targets clippy, and fix additional lint errors

* newline in ci file
This commit is contained in:
James Wilson
2021-11-19 10:36:38 +00:00
committed by GitHub
parent dcb78a2784
commit 97f4112e92
16 changed files with 190 additions and 79 deletions
+6 -6
View File
@@ -51,13 +51,13 @@ async fn tx_basic_transfer() {
let alice_pre = api
.storage()
.system()
.account(alice.account_id().clone().into(), None)
.account(alice.account_id().clone(), None)
.await
.unwrap();
let bob_pre = api
.storage()
.system()
.account(bob.account_id().clone().into(), None)
.account(bob.account_id().clone(), None)
.await
.unwrap();
@@ -74,7 +74,7 @@ async fn tx_basic_transfer() {
.unwrap();
let _extrinsic_success = result
.find_event::<system::events::ExtrinsicSuccess>()
.expect("Failed to decode ExtrinisicSuccess".into())
.expect("Failed to decode ExtrinisicSuccess")
.expect("Failed to find ExtrinisicSuccess");
let expected_event = balances::events::Transfer(
@@ -87,13 +87,13 @@ async fn tx_basic_transfer() {
let alice_post = api
.storage()
.system()
.account(alice.account_id().clone().into(), None)
.account(alice.account_id().clone(), None)
.await
.unwrap();
let bob_post = api
.storage()
.system()
.account(bob.account_id().clone().into(), None)
.account(bob.account_id().clone(), None)
.await
.unwrap();
@@ -200,7 +200,7 @@ async fn transfer_subscription() {
let cxt = test_context().await;
let sub = cxt.client().rpc().subscribe_events().await.unwrap();
let decoder = cxt.client().events_decoder();
let mut sub = EventSubscription::<DefaultConfig>::new(sub, &decoder);
let mut sub = EventSubscription::<DefaultConfig>::new(sub, decoder);
sub.filter_event::<balances::events::Transfer>();
cxt.api
+2 -2
View File
@@ -56,7 +56,7 @@ impl ContractsTestContext {
}
fn client(&self) -> &Client<DefaultConfig> {
&self.cxt.client()
self.cxt.client()
}
fn contracts_tx(&self) -> TransactionApi<DefaultConfig> {
@@ -172,7 +172,7 @@ async fn tx_instantiate() {
let ctx = ContractsTestContext::init().await;
let (code_hash, _) = ctx.instantiate_with_code().await.unwrap();
let instantiated = ctx.instantiate(code_hash.into(), vec![], vec![1u8]).await;
let instantiated = ctx.instantiate(code_hash, vec![], vec![1u8]).await;
assert!(
instantiated.is_ok(),
+1 -1
View File
@@ -32,7 +32,7 @@ type BalancesCall = runtime_types::pallet_balances::pallet::Call;
#[async_std::test]
async fn test_sudo() {
let alice = PairSigner::<DefaultConfig, _>::new(AccountKeyring::Alice.pair());
let bob = AccountKeyring::Bob.to_account_id().clone().into();
let bob = AccountKeyring::Bob.to_account_id().into();
let cxt = test_context().await;
let call = Call::Balances(BalancesCall::transfer {
+1 -1
View File
@@ -37,7 +37,7 @@ async fn storage_account() {
.api
.storage()
.system()
.account(alice.account_id().clone().into(), None)
.account(alice.account_id().clone(), None)
.await;
assert_matches!(account_info, Ok(_))
}