git.delta.rocks / unique-network / refs/commits / d892f52ad1a3

difftreelog

ci fix codestyle failures

Yaroslav Bolyukin2023-09-08parent: #dfae293.patch.diff
in: master

4 files changed

modified.github/workflows/codestyle.ymldiffbeforeafterboth
before · .github/workflows/codestyle.yml
1# https://cryptousetech.atlassian.net/wiki/spaces/CI/pages/2586837012/Code+style+testing2# Nested workflow for checks related to formatting Rust code 34name: codestyle56# Triger: only call from main workflow(re-usable workflows)7on:8  workflow_call:910jobs:11  rustfmt:12    runs-on: [ self-hosted-ci ]13    steps:14      - name: Clean Workspace15        uses: AutoModality/action-clean@v1.1.016      - uses: actions/checkout@v3.1.017        with:18          ref: ${{ github.head_ref }}            19      - name: Read .env file20        uses: xom9ikk/dotenv@v2          21      - name: Install toolchain version from .env22        uses: dtolnay/rust-toolchain@master23        with:24            toolchain: ${{ env.RUST_TOOLCHAIN }}25            targets: wasm32-unknown-unknown26            components: rustfmt, clippy27      - name: Run cargo fmt28        run: cargo fmt -- --check   # In that mode it returns only exit code.29      - name: Cargo fmt state30        if: success()31        run: echo "Nothing to do. Command 'cargo fmt -- --check' returned exit code 0."3233  yarn_eslint:34    runs-on: [ self-hosted-ci ]35    steps:36      - name: Clean Workspace37        uses: AutoModality/action-clean@v1.1.038      - uses: actions/checkout@v3.1.039        with:40          ref: ${{ github.head_ref }}            41      - uses: actions/setup-node@v3.5.142        with:43          node-version: 1844      - name: Install modules45        run: cd tests && yarn46      - name: Run ESLint47        run: cd tests && yarn eslint --ext .ts,.js --max-warnings=0 src/4849  clippy:50    runs-on: [ self-hosted-ci ]51    steps:52      - uses: actions/checkout@v3.1.053      - name: Install substrate dependencies54        run: sudo apt install -y libssl-dev pkg-config libclang-dev clang protobuf-compiler55      - name: Read .env file56        uses: xom9ikk/dotenv@v257      - name: Install toolchain version from .env58        uses: dtolnay/rust-toolchain@master59        with:60            toolchain: ${{ env.RUST_TOOLCHAIN }}61            targets: wasm32-unknown-unknown62            components: rustfmt, clippy63      - name: Run cargo check64        run: cargo clippy --features=quartz-runtime,unique-runtime,try-runtime,runtime-benchmarks --tests -- -Dwarnings65        env:66          SKIP_WASM_BUILD: '1'
after · .github/workflows/codestyle.yml
1# https://cryptousetech.atlassian.net/wiki/spaces/CI/pages/2586837012/Code+style+testing2# Nested workflow for checks related to formatting Rust code 34name: codestyle56# Triger: only call from main workflow(re-usable workflows)7on:8  workflow_call:910jobs:11  rustfmt:12    runs-on: [ self-hosted-ci ]13    steps:14      - name: Clean Workspace15        uses: AutoModality/action-clean@v1.1.016      - uses: actions/checkout@v3.1.017        with:18          ref: ${{ github.head_ref }}            19      - name: Read .env file20        uses: xom9ikk/dotenv@v2          21      - name: Install toolchain version from .env22        uses: dtolnay/rust-toolchain@master23        with:24            toolchain: ${{ env.RUST_TOOLCHAIN }}25            targets: wasm32-unknown-unknown26            components: rustfmt, clippy27      - name: Run cargo fmt28        run: cargo fmt -- --check   # In that mode it returns only exit code.29      - name: Cargo fmt state30        if: success()31        run: echo "Nothing to do. Command 'cargo fmt -- --check' returned exit code 0."3233  yarn_eslint:34    runs-on: [ self-hosted-ci ]35    steps:36      - name: Clean Workspace37        uses: AutoModality/action-clean@v1.1.038      - uses: actions/checkout@v3.1.039        with:40          ref: ${{ github.head_ref }}            41      - uses: actions/setup-node@v3.5.142        with:43          node-version: 1844      - name: Install modules45        run: cd tests && yarn46      - name: Run ESLint47        # run: cd tests && yarn eslint --ext .ts,.js --max-warnings=0 src/48        run: cd tests && yarn eslint --ext .ts,.js src/4950  clippy:51    runs-on: [ self-hosted-ci ]52    steps:53      - uses: actions/checkout@v3.1.054      - name: Install substrate dependencies55        run: sudo apt install -y libssl-dev pkg-config libclang-dev clang protobuf-compiler56      - name: Read .env file57        uses: xom9ikk/dotenv@v258      - name: Install toolchain version from .env59        uses: dtolnay/rust-toolchain@master60        with:61            toolchain: ${{ env.RUST_TOOLCHAIN }}62            targets: wasm32-unknown-unknown63            components: rustfmt, clippy64      - name: Run cargo check65        run: cargo clippy --features=quartz-runtime,unique-runtime,try-runtime,runtime-benchmarks --tests -- -Dwarnings66        env:67          SKIP_WASM_BUILD: '1'
modifiednode/rpc/src/lib.rsdiffbeforeafterboth
--- a/node/rpc/src/lib.rs
+++ b/node/rpc/src/lib.rs
@@ -162,7 +162,7 @@
 
 	io.merge(Unique::new(client.clone()).into_rpc())?;
 
-	io.merge(AppPromotion::new(client.clone()).into_rpc())?;
+	io.merge(AppPromotion::new(client).into_rpc())?;
 
 	#[cfg(feature = "pov-estimate")]
 	io.merge(
modifiedtests/src/util/globalSetup.tsdiffbeforeafterboth
--- a/tests/src/util/globalSetup.ts
+++ b/tests/src/util/globalSetup.ts
@@ -115,5 +115,5 @@
 globalSetup().catch(e => {
   console.error('Setup error');
   console.error(e);
-  process.exit(1)
+  process.exit(1);
 });
modifiedtests/src/xcm/xcmQuartz.test.tsdiffbeforeafterboth
--- a/tests/src/xcm/xcmQuartz.test.ts
+++ b/tests/src/xcm/xcmQuartz.test.ts
@@ -688,10 +688,8 @@
       maliciousXcmProgramSent = await helper.wait.expectEvent(maxWaitBlocks, Event.XcmpQueue.XcmpMessageSent);
     });
 
-    await helper.wait.expectEvent(maxWaitBlocks, Event.XcmpQueue.Fail, event => {
-      return event.messageHash == maliciousXcmProgramSent.messageHash
-        && event.outcome.isFailedToTransactAsset;
-    });
+    await helper.wait.expectEvent(maxWaitBlocks, Event.XcmpQueue.Fail, event => event.messageHash == maliciousXcmProgramSent.messageHash
+        && event.outcome.isFailedToTransactAsset);
 
     targetAccountBalance = await helper.balance.getSubstrate(targetAccount.address);
     expect(targetAccountBalance).to.be.equal(0n);