Return ExtrinsicReport also for failed extrinsic #1730
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Build & Test & Clippy | |
on: | |
workflow_dispatch: | |
push: | |
branches: [ master, 'polkadot-v[0-9]+.[0-9]+.[0-9]+*', 'release-polkadot-v[0-9]+.[0-9]+.[0-9]+*' ] | |
pull_request: | |
branches: [ master, 'polkadot-v[0-9]+.[0-9]+.[0-9]+*', 'release-polkadot-v[0-9]+.[0-9]+.[0-9]+*' ] | |
env: | |
CARGO_TERM_COLOR: always | |
jobs: | |
cancel_previous_runs: | |
name: Cancel Previous Runs | |
runs-on: ubuntu-20.04 | |
steps: | |
- uses: styfle/cancel-workflow-action@0.11.0 | |
with: | |
access_token: ${{ secrets.GITHUB_TOKEN }} | |
build: | |
name: ${{ matrix.check }} | |
runs-on: ${{ matrix.os }} | |
strategy: | |
fail-fast: false | |
matrix: | |
os: [ ubuntu-latest ] | |
# We need to compile `test-no-std` separately, otherwise we have std leaks from the build-deps. | |
# | |
# `test-no-std` is only meant to check if the `substrate-api-client` compiles to `no_std`, hence | |
# we omit clippy and test there. | |
check: [ | |
# Test for no-std compatibility. | |
# `--locked` to enforce an up-to-date Cargo.lock | |
cargo build --release --workspace --locked --exclude test-no-std, | |
# Test for no-std compatibility. | |
cargo build --release -p test-no-std --features api-client, | |
cargo build --release -p test-no-std --features compose-macros, | |
cargo build --release -p test-no-std --features node-api, | |
cargo build --release -p test-no-std --features primitives, | |
# Check build of stand-alone features. | |
cargo check --no-default-features, | |
cargo check --no-default-features --features sync-api, | |
cargo check --no-default-features --features jsonrpsee-client, | |
cargo check --no-default-features --features tungstenite-client, | |
cargo check --no-default-features --features ws-client, | |
cargo check --no-default-features --features staking-xt, | |
cargo check --no-default-features --features contracts-xt, | |
cargo check --no-default-features --features std, | |
# Test for 32 bit and wasm32-unknown-unknown compatibility | |
cargo build --target wasm32-unknown-unknown --no-default-features --features sync-api, | |
# Compile examples and integration test separately to ensure features are not cross-imported | |
cargo test --release -p ac-examples-async, | |
cargo test --release -p ac-examples-sync, | |
cargo test --release -p ac-testing-async, | |
cargo test --release -p ac-testing-sync, | |
# Clippy | |
cargo clippy -- -D warnings, | |
cargo clippy --no-default-features -- -D warnings, | |
cargo clippy --all-features --examples -- -D warnings, | |
# Run unit tests | |
cargo test --release --all-features --workspace --exclude test-no-std --exclude "ac-examples-*" --exclude "ac-testing-*", | |
# Fmt | |
cargo fmt --all -- --check | |
] | |
steps: | |
- uses: actions/checkout@v3 | |
- name: init-rust-target | |
run: rustup show && rustup component add rust-src | |
- uses: Swatinem/rust-cache@v2 | |
with: | |
key: ${{ matrix.check }} | |
- name: ${{ matrix.check }} | |
run: ${{ matrix.check }} | |
- name: Upload sync examples | |
uses: actions/upload-artifact@v3 | |
if: contains(matrix.check, 'cargo test') | |
with: | |
name: examples | |
path: | | |
target/release/examples/* | |
!target/release/examples/*async* | |
!target/release/examples/*.d | |
!target/release/examples/*-* | |
- name: Upload async examples | |
uses: actions/upload-artifact@v3 | |
if: contains(matrix.check, 'async') | |
with: | |
name: examples | |
path: | | |
target/release/examples/*async | |
taplo-fmt: | |
name: "Taplo fmt" | |
runs-on: ubuntu-latest | |
container: "tamasfe/taplo:0.7.0-alpine" | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Run Taplo fmt | |
run: taplo fmt --check | |
license-check: | |
name: "License check" | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Install cargo-about | |
uses: baptiste0928/cargo-install@v2 | |
with: | |
crate: cargo-about | |
version: "0.5" | |
- name: Run license check | |
# Explicitly use stable because otherwise cargo will trigger a download of | |
# the nightly version specified in rust-toolchain.toml | |
run: cargo +stable about generate about.hbs > license.html | |
- name: Archive license file | |
uses: actions/upload-artifact@v3 | |
with: | |
name: license | |
path: license.html | |
examples: | |
runs-on: ${{ matrix.os }} | |
needs: build | |
strategy: | |
fail-fast: false | |
matrix: | |
os: [ ubuntu-latest ] | |
example: [ | |
benchmark_bulk_xt, | |
compose_extrinsic, | |
custom_nonce, | |
check_extrinsic_events, | |
get_account_identity, | |
get_blocks, | |
get_storage, | |
print_metadata, | |
staking_batch_payout, | |
subscribe_events, | |
sudo, | |
transfer_with_tungstenite_client, | |
transfer_with_ws_client, | |
author_tests, | |
chain_tests, | |
dispatch_errors_tests, | |
frame_system_tests, | |
keystore_tests, | |
pallet_balances_tests, | |
pallet_transaction_payment_tests, | |
runtime_api_tests, | |
tungstenite_client_test, | |
ws_client_test, | |
state_tests, | |
query_runtime_api, | |
runtime_update_sync, | |
runtime_update_async, | |
] | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Run latest node | |
run: | | |
docker run -p 9944:9944 -p 9933:9933 -p 30333:30333 parity/substrate:latest --dev --rpc-external & | |
- name: Wait until node has started | |
run: sleep 20s | |
shell: bash | |
- name: Download example from previous run | |
uses: actions/download-artifact@v3 | |
with: | |
name: examples | |
- name: Run Examples | |
timeout-minutes: 5 | |
run: | | |
docker ps | |
nc -z -v 127.0.0.1 9944 | |
chmod +x ${{ matrix.example }} | |
./${{ matrix.example }} |