Skip to content

fix: release conflicts (#765) #3

fix: release conflicts (#765)

fix: release conflicts (#765) #3

Workflow file for this run

# 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
jobs:
test:
name: Test Suite
runs-on: ubuntu-latest
steps:
- name: Checkout sources
uses: actions/checkout@v3
- name: Install Rust
run: rustup update stable
- 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 update stable
- 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 }}"