diff --git a/.github/workflows/rust.yml b/.github/workflows/rust.yml index baaf2978..8da6f69d 100644 --- a/.github/workflows/rust.yml +++ b/.github/workflows/rust.yml @@ -7,9 +7,10 @@ on: pull_request: paths-ignore: - '**/*.md' + - '**/*.go' jobs: - test: + build-wasm: name: Build Wasm runs-on: ubuntu-latest steps: @@ -40,6 +41,90 @@ jobs: env: RUSTFLAGS: "-C link-arg=-s" + build-no-default: + name: Build with No Default Features + runs-on: ubuntu-latest + steps: + - name: Checkout sources + uses: actions/checkout@v2 + + - name: Install stable toolchain + uses: actions-rs/toolchain@v1 + with: + profile: minimal + toolchain: 1.73.0 + override: true + + - name: Run unit tests + uses: actions-rs/cargo@v1 + with: + command: unit-test + args: --locked --no-default-features + env: + RUST_BACKTRACE: 1 + + - name: Build + uses: actions-rs/cargo@v1 + with: + command: build + args: --locked --no-default-features + + build-all-features: + name: Build with All Features + runs-on: ubuntu-latest + steps: + - name: Checkout sources + uses: actions/checkout@v2 + + - name: Install stable toolchain + uses: actions-rs/toolchain@v1 + with: + profile: minimal + toolchain: 1.73.0 + override: true + + - name: Run unit tests + uses: actions-rs/cargo@v1 + with: + command: unit-test + args: --locked --all-features + env: + RUST_BACKTRACE: 1 + + - name: Build + uses: actions-rs/cargo@v1 + with: + command: build + args: --locked --all-features + + build-with-staking: + name: Build with Staking Feature + runs-on: ubuntu-latest + steps: + - name: Checkout sources + uses: actions/checkout@v2 + + - name: Install stable toolchain + uses: actions-rs/toolchain@v1 + with: + profile: minimal + toolchain: 1.73.0 + override: true + + - name: Run unit tests + uses: actions-rs/cargo@v1 + with: + command: unit-test + args: --locked --features=staking + env: + RUST_BACKTRACE: 1 + + - name: Build + uses: actions-rs/cargo@v1 + with: + command: build + args: --locked --features=staking + lints: name: Lint Contract runs-on: ubuntu-latest diff --git a/Cargo.toml b/Cargo.toml index 3bdde413..3472474b 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -28,8 +28,6 @@ overflow-checks = true [features] # disable export feature to disable all instantiate/execute/query exports default = ["export", "staking"] -# for more explicit tests, cargo test --features=backtraces -backtraces = ["cosmwasm-std/backtraces"] export = [] staking = ["cosmwasm-std/staking"] diff --git a/README.md b/README.md index 88c3e46a..9d5453fc 100644 --- a/README.md +++ b/README.md @@ -23,8 +23,7 @@ This is a CosmWasm smart contract that communicates with the golang `ica/host` m - [Using `InstantiateMsg`](#using-instantiatemsg) - [Using `ExecuteMsg::CreateChannel`](#using-executemsgcreatechannel) - [Execute an interchain account transaction](#execute-an-interchain-account-transaction) - - [`SendCosmosMsgs` (recommended)](#sendcosmosmsgs-recommended) - - [`SendCustomIcaMessages`](#sendcustomicamessages) + - [`SendCosmosMsgs`](#sendcosmosmsgs) - [Execute a callback](#execute-a-callback) - [Channel Closing and Reopening](#channel-closing-and-reopening) - [Channel Closing](#channel-closing)