mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-06-11 15:21:08 +00:00
ci: Ensure order of execution for CI steps (#1375)
* ci: Move steps in order of execution Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io> * ci: Add step dependency Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io> * ci: Reintroduce cargo check step Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io> --------- Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>
This commit is contained in:
+71
-61
@@ -22,9 +22,62 @@ env:
|
||||
WASM_BINDGEN_TEST_TIMEOUT: 60
|
||||
|
||||
jobs:
|
||||
fmt:
|
||||
name: Cargo fmt
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout sources
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Install Rust nightly toolchain
|
||||
uses: actions-rs/toolchain@v1
|
||||
with:
|
||||
profile: minimal
|
||||
toolchain: stable
|
||||
override: true
|
||||
components: rustfmt
|
||||
|
||||
- name: Rust Cache
|
||||
uses: Swatinem/rust-cache@23bce251a8cd2ffc3c1075eaa2367cf899916d84 # v2.7.3
|
||||
|
||||
- name: Cargo fmt
|
||||
uses: actions-rs/cargo@v1.0.3
|
||||
with:
|
||||
command: fmt
|
||||
args: --all -- --check
|
||||
|
||||
clippy:
|
||||
name: Cargo clippy
|
||||
runs-on: ubuntu-latest
|
||||
needs: fmt
|
||||
steps:
|
||||
- name: Checkout sources
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Use substrate-node binary
|
||||
uses: ./.github/workflows/actions/use-substrate
|
||||
|
||||
- name: Install Rust stable toolchain
|
||||
uses: actions-rs/toolchain@v1
|
||||
with:
|
||||
profile: minimal
|
||||
toolchain: stable
|
||||
components: clippy
|
||||
override: true
|
||||
|
||||
- name: Rust Cache
|
||||
uses: Swatinem/rust-cache@23bce251a8cd2ffc3c1075eaa2367cf899916d84 # v2.7.3
|
||||
|
||||
- name: Run clippy
|
||||
uses: actions-rs/cargo@v1
|
||||
with:
|
||||
command: clippy
|
||||
args: --all-targets -- -D warnings
|
||||
|
||||
check:
|
||||
name: Cargo check
|
||||
runs-on: ubuntu-latest
|
||||
needs: [fmt, clippy]
|
||||
steps:
|
||||
- name: Checkout sources
|
||||
uses: actions/checkout@v4
|
||||
@@ -83,6 +136,7 @@ jobs:
|
||||
wasm_check:
|
||||
name: Cargo check (WASM)
|
||||
runs-on: ubuntu-latest
|
||||
needs: [fmt, clippy]
|
||||
steps:
|
||||
- name: Checkout sources
|
||||
uses: actions/checkout@v4
|
||||
@@ -103,33 +157,39 @@ jobs:
|
||||
run: |
|
||||
cargo check --manifest-path examples/wasm-example/Cargo.toml --target wasm32-unknown-unknown
|
||||
|
||||
fmt:
|
||||
name: Cargo fmt
|
||||
machete:
|
||||
name: "Check unused dependencies"
|
||||
runs-on: ubuntu-latest
|
||||
needs: [check, wasm_check]
|
||||
steps:
|
||||
- name: Checkout sources
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Install Rust nightly toolchain
|
||||
- name: Use substrate-node binary
|
||||
uses: ./.github/workflows/actions/use-substrate
|
||||
|
||||
- name: Install Rust stable toolchain
|
||||
uses: actions-rs/toolchain@v1
|
||||
with:
|
||||
profile: minimal
|
||||
toolchain: stable
|
||||
override: true
|
||||
components: rustfmt
|
||||
|
||||
- name: Rust Cache
|
||||
uses: Swatinem/rust-cache@23bce251a8cd2ffc3c1075eaa2367cf899916d84 # v2.7.3
|
||||
|
||||
- name: Cargo fmt
|
||||
- name: Install cargo-machete
|
||||
run: cargo install cargo-machete
|
||||
|
||||
- name: Check unused dependencies
|
||||
uses: actions-rs/cargo@v1.0.3
|
||||
with:
|
||||
command: fmt
|
||||
args: --all -- --check
|
||||
command: machete
|
||||
|
||||
docs:
|
||||
name: Check documentation and run doc tests
|
||||
runs-on: ubuntu-latest
|
||||
needs: [check, wasm_check]
|
||||
steps:
|
||||
- name: Checkout sources
|
||||
uses: actions/checkout@v4
|
||||
@@ -159,6 +219,7 @@ jobs:
|
||||
tests:
|
||||
name: "Test (Native)"
|
||||
runs-on: ubuntu-latest-16-cores
|
||||
needs: [machete, docs]
|
||||
timeout-minutes: 30
|
||||
steps:
|
||||
- name: Checkout sources
|
||||
@@ -189,6 +250,7 @@ jobs:
|
||||
unstable_backend_tests:
|
||||
name: "Test (Unstable Backend)"
|
||||
runs-on: ubuntu-latest-16-cores
|
||||
needs: [machete, docs]
|
||||
timeout-minutes: 30
|
||||
steps:
|
||||
- name: Checkout sources
|
||||
@@ -219,6 +281,7 @@ jobs:
|
||||
light_client_tests:
|
||||
name: "Test (Light Client)"
|
||||
runs-on: ubuntu-latest
|
||||
needs: [machete, docs]
|
||||
timeout-minutes: 15
|
||||
steps:
|
||||
- name: Checkout sources
|
||||
@@ -246,6 +309,7 @@ jobs:
|
||||
wasm_tests:
|
||||
name: Test (WASM)
|
||||
runs-on: ubuntu-latest
|
||||
needs: [machete, docs]
|
||||
timeout-minutes: 30
|
||||
env:
|
||||
# Set timeout for wasm tests to be much bigger than the default 20 secs.
|
||||
@@ -294,57 +358,3 @@ jobs:
|
||||
wasm-pack test --headless --firefox
|
||||
wasm-pack test --headless --chrome
|
||||
working-directory: signer/wasm-tests
|
||||
|
||||
clippy:
|
||||
name: Cargo clippy
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout sources
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Use substrate-node binary
|
||||
uses: ./.github/workflows/actions/use-substrate
|
||||
|
||||
- name: Install Rust stable toolchain
|
||||
uses: actions-rs/toolchain@v1
|
||||
with:
|
||||
profile: minimal
|
||||
toolchain: stable
|
||||
components: clippy
|
||||
override: true
|
||||
|
||||
- name: Rust Cache
|
||||
uses: Swatinem/rust-cache@23bce251a8cd2ffc3c1075eaa2367cf899916d84 # v2.7.3
|
||||
|
||||
- name: Run clippy
|
||||
uses: actions-rs/cargo@v1
|
||||
with:
|
||||
command: clippy
|
||||
args: --all-targets -- -D warnings
|
||||
machete:
|
||||
name: "Check unused dependencies"
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout sources
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Use substrate-node binary
|
||||
uses: ./.github/workflows/actions/use-substrate
|
||||
|
||||
- name: Install Rust stable toolchain
|
||||
uses: actions-rs/toolchain@v1
|
||||
with:
|
||||
profile: minimal
|
||||
toolchain: stable
|
||||
override: true
|
||||
|
||||
- name: Rust Cache
|
||||
uses: Swatinem/rust-cache@23bce251a8cd2ffc3c1075eaa2367cf899916d84 # v2.7.3
|
||||
|
||||
- name: Install cargo-machete
|
||||
run: cargo install cargo-machete
|
||||
|
||||
- name: Check unused dependencies
|
||||
uses: actions-rs/cargo@v1.0.3
|
||||
with:
|
||||
command: machete
|
||||
|
||||
Reference in New Issue
Block a user