feat: add cw20Adapter for Injective #328
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/**" | |
- ".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: Lock Rust Version | |
run: rustup override set nightly-2023-03-27 | |
- 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: Lock Rust Version | |
run: rustup override set nightly-2023-03-27 | |
- name: Install cargo-fmt | |
run: rustup component add --toolchain nightly-2023-03-27-x86_64-unknown-linux-gnu rustfmt | |
- name: Install clippy | |
run: rustup component add --toolchain nightly-2023-03-27-x86_64-unknown-linux-gnu clippy | |
- 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 -- -W 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 }}" |