Skip to content
This repository has been archived by the owner on Oct 22, 2024. It is now read-only.

Commit

Permalink
Fix the format ci (#154)
Browse files Browse the repository at this point in the history
  • Loading branch information
yrong authored Jun 26, 2024
1 parent d79ef62 commit f7054e7
Show file tree
Hide file tree
Showing 3 changed files with 49 additions and 8 deletions.
51 changes: 45 additions & 6 deletions .github/workflows/parachain.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ env:
RUST_NIGHTLY: "2023-05-23"

jobs:
check:
format:
runs-on: snowbridge-runner
env:
CARGO_INCREMENTAL: 0
Expand Down Expand Up @@ -54,12 +54,9 @@ jobs:
rustup toolchain install nightly
rustup component add rustfmt --toolchain nightly
rustup show
- name: cargo check
run: cargo check --workspace --all-features
- name: clippy
run: cargo clippy --all-features -- -D warnings
- name: format
run: cargo +nightly fmt --all -- --check
working-directory: bridges/snowbridge
run: cargo +nightly fmt -- --check
- name: install taplo
run: |
cargo install taplo-cli --locked
Expand All @@ -76,6 +73,48 @@ jobs:
markdownlint --version
markdownlint --config .github/.markdownlint.yaml --ignore target
check:
runs-on: snowbridge-runner
env:
CARGO_INCREMENTAL: 0
RUST_BACKTRACE: 1
RUSTFLAGS: -C debuginfo=1
SKIP_WASM_BUILD: 1
RUST_NIGHTLY_VERSION: nightly-2024-02-08
steps:
- uses: actions/checkout@v2
with:
submodules: "true"
- uses: arduino/setup-protoc@v2
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}
- uses: actions/cache@v1
with:
path: |
~/.cargo/registry
~/.cargo/git
key: ${{ runner.os }}-cargo-${{ hashFiles('Cargo.lock') }}
restore-keys: |
${{ runner.os }}-cargo-
- uses: actions/[email protected]
with:
node-version: "18.x"
registry-url: "https://npm.pkg.github.com"
scope: "@paritytech"
- name: setup rust toolchain
run: |
rustup target add wasm32-unknown-unknown
curl -LO https://github.com/paritytech/rustc-rv32e-toolchain/releases/download/v1.1.0/rust-rve-nightly-2024-01-05-x86_64-unknown-linux-gnu.tar.zst
tar -I zstd -xf rust-rve-nightly-2024-01-05-x86_64-unknown-linux-gnu.tar.zst
mv rve-nightly ~/.rustup/toolchains/
rustup toolchain install nightly
rustup component add rustfmt --toolchain nightly
rustup show
- name: cargo check
run: cargo check --workspace --all-features
- name: clippy
run: cargo clippy --all-features -- -D warnings

test:
needs: check
runs-on: snowbridge-runner
Expand Down
3 changes: 2 additions & 1 deletion bridges/snowbridge/primitives/router/src/inbound/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,8 @@ impl<CreateAssetCall, CreateAssetDeposit, InboundQueuePalletInstance, AccountId,
InboundQueuePalletInstance,
AccountId,
Balance,
> where
>
where
CreateAssetCall: Get<CallIndex>,
CreateAssetDeposit: Get<u128>,
InboundQueuePalletInstance: Get<u8>,
Expand Down
3 changes: 2 additions & 1 deletion bridges/snowbridge/runtime/runtime-common/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,8 @@ impl<Balance, AccountId, FeeAssetLocation, EthereumNetwork, AssetTransactor, Fee
EthereumNetwork,
AssetTransactor,
FeeProvider,
> where
>
where
Balance: BaseArithmetic + Unsigned + Copy + From<u128> + Into<u128> + Debug,
AccountId: Clone + FullCodec,
FeeAssetLocation: Get<Location>,
Expand Down

0 comments on commit f7054e7

Please sign in to comment.