From 316a455ae5d22279f24462e81a4d4eced7328203 Mon Sep 17 00:00:00 2001 From: A5 Pickle Date: Wed, 20 Mar 2024 10:24:38 -0500 Subject: [PATCH] .github: split workflow --- .github/workflows/build.yml | 33 +++++++++++++++++++++++++++++++-- 1 file changed, 31 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 2b0f5b9dd6..e31f14928c 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -328,7 +328,7 @@ jobs: run: cd node && go test -v -timeout 5m -race -ldflags '-extldflags "-Wl,--allow-multiple-definition" ' ./... # Run Rust lints and tests - rust-lint-and-tests: + cw-terra-lint-and-tests: runs-on: ubuntu-20.04 env: RUSTFLAGS: -Dwarnings @@ -337,7 +337,6 @@ jobs: manifest: - cosmwasm/Cargo.toml - terra/Cargo.toml - - sdk/rust/Cargo.toml steps: - name: Check out source uses: actions/checkout@v3 @@ -380,6 +379,36 @@ jobs: - name: Run unit tests run: cargo test --workspace --locked --manifest-path ${{ matrix.manifest }} + # Run Rust lints and tests + rust-sdk-lint-and-tests: + runs-on: ubuntu-20.04 + env: + RUSTFLAGS: -Dwarnings + strategy: + matrix: + manifest: + - cosmwasm/Cargo.toml + - terra/Cargo.toml + - sdk/rust/Cargo.toml + steps: + - name: Check out source + uses: actions/checkout@v3 + + - name: Install rust toolchain + uses: dtolnay/rust-toolchain@55c7845fad90d0ae8b2e83715cb900e5e861e8cb + with: + toolchain: stable + components: "clippy,rustfmt" + + - name: Run `cargo fmt` + run: cd sdk/rust && cargo fmt --check + + - name: Run `cargo clippy` + run: cargo clippy --all-features --all-targets --tests --manifest-path sdk/rust/Cargo.toml + + - name: Run `cargo test` + run: cargo test --all-features --all-targets --manifest-path sdk/rust/Cargo.toml + docker: runs-on: ubuntu-latest steps: