fix: update mock ibc core (#795) #5
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
# Based on https://github.com/actions-rs/example/blob/master/.github/workflows/quickstart.yml | |
name: Test and Lint CW contracts | |
on: | |
pull_request: | |
branches: | |
- "**" | |
paths: | |
- "contracts/cosmwasm-vm/**" | |
- "libraries/common/rust/**" | |
- ".github/workflows/basic-rust.yml" | |
push: | |
branches: | |
- main | |
env: | |
RUSTC_VERSION: '1.69.0' | |
RUSTC_TOOLCHAIN: '1.69.0-x86_64-unknown-linux-gnu' | |
jobs: | |
test: | |
name: Test Suite | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout sources | |
uses: actions/checkout@v3 | |
- name: Install Rust | |
run: | | |
rustup install "$RUSTC_VERSION" | |
rustup default "$RUSTC_TOOLCHAIN" | |
rustup component add clippy | |
rustup component add rustfmt | |
- name: Cache Rust dependencies | |
uses: Swatinem/rust-cache@v2 | |
- name: Run unit tests | |
run: | | |
RUST_BACKTRACE=1 cargo unit-test --locked | |
- name: Install wasm32 | |
run: | | |
rustup target add wasm32-unknown-unknown | |
- name: Compile WASM contract | |
run: | | |
RUSTFLAGS='-C link-arg=-s' cargo wasm --locked | |
lints: | |
name: Lints | |
runs-on: ubuntu-latest | |
defaults: | |
run: | |
working-directory: contracts/cosmwasm-vm | |
steps: | |
- name: Checkout sources | |
uses: actions/checkout@v3 | |
- name: Install Rust | |
run: | | |
rustup install "$RUSTC_VERSION" | |
rustup default "$RUSTC_TOOLCHAIN" | |
rustup component add clippy | |
rustup component add rustfmt | |
- name: Cache Rust dependencies | |
uses: Swatinem/rust-cache@v2 | |
- name: Run cargo fmt | |
run: | | |
cargo fmt --all -- --check | |
- name: Run cargo clippy | |
run: | | |
cargo clippy | |
- name: Generate schema | |
run: | | |
../../scripts/run_in_subprojects.sh cw-ibc-core cw-icon-light-client cw-xcall-ibc-connection | |
- name: Verify schema | |
uses: tj-actions/verify-changed-files@v14 | |
id: verify-schema | |
with: | |
files: | | |
contracts/cosmwasm-vm/*/schema/** | |
- name: Display changed schemas | |
if: steps.verify-schema.outputs.files_changed == 'true' | |
run: | | |
echo "Changed files: ${{ steps.verify-schema.outputs.changed_files }}" |