Skip to content

Merge pull request #62 from balancednetwork/bugfix/native-deposit-fee… #304

Merge pull request #62 from balancednetwork/bugfix/native-deposit-fee…

Merge pull request #62 from balancednetwork/bugfix/native-deposit-fee… #304

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/**"
- ".github/workflows/Basic.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
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 -- -D warnings
- name: Generate schema
run: |
cd contracts
../scripts/run_in_subprojects.sh token-contracts/cw-hub-bnusd core-contracts/cw-asset-manager
- name: Verify schema
uses: tj-actions/verify-changed-files@v14
id: verify-schema
with:
files: |
contracts/*/*/schema/**
- name: Display changed schemas
if: steps.verify-schema.outputs.files_changed == 'true'
run: |
echo "Changed files: ${{ steps.verify-schema.outputs.changed_files }}"