Skip to content

Commit

Permalink
[capricorn] Upgrade to cosmwasm 1.0.0. beta (#48)
Browse files Browse the repository at this point in the history
* chores: upgrade cosmwasm to v1.0.0-beta

* chores: clippy fixes

* fix tests, add compiled & optimized contract

* feat: add back schema generation

* chores: enable rust actions

* chores: fix ghaction workdir

* fix: ghaction workdir / clippy / fmt

* fix: more clippy
  • Loading branch information
daeMOn63 authored Jan 27, 2022
1 parent d5c2fa2 commit e9201af
Show file tree
Hide file tree
Showing 23 changed files with 1,123 additions and 578 deletions.
1 change: 1 addition & 0 deletions .cargo
Original file line number Diff line number Diff line change
@@ -1,11 +1,14 @@
# Based on https://github.com/actions-rs/example/blob/master/.github/workflows/quickstart.yml

on: [push, pull_request]
on:
pull_request:
push:
branches:
- master

name: Basic

jobs:

test:
name: Test Suite
runs-on: ubuntu-latest
Expand All @@ -17,33 +20,28 @@ jobs:
uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: 1.43.1
toolchain: 1.56.0
target: wasm32-unknown-unknown
override: true

- name: Run unit tests
uses: actions-rs/cargo@v1
with:
command: unit-test
args: --locked
args: --locked --manifest-path fetch/cosmwasm_contract/Cargo.toml
env:
RUST_BACKTRACE: 1

# this requires the .cargo symlink at project root on fetch/cosmwasm_contract/.cargo
# to work.
- name: Compile WASM contract
uses: actions-rs/cargo@v1
with:
command: wasm
args: --locked
args: --locked --manifest-path fetch/cosmwasm_contract/Cargo.toml
env:
RUSTFLAGS: "-C link-arg=-s"

- name: Run integration tests
uses: actions-rs/cargo@v1
with:
command: integration-test
args: --locked


lints:
name: Lints
runs-on: ubuntu-latest
Expand All @@ -55,21 +53,21 @@ jobs:
uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: 1.43.1
toolchain: 1.56.0
override: true
components: rustfmt, clippy

- name: Run cargo fmt
uses: actions-rs/cargo@v1
with:
command: fmt
args: --all -- --check
args: --all --manifest-path fetch/cosmwasm_contract/Cargo.toml -- --check

- name: Run cargo clippy
uses: actions-rs/cargo@v1
with:
command: clippy
args: -- -D warnings
args: --manifest-path fetch/cosmwasm_contract/Cargo.toml -- -D warnings

# TODO: we should check
# CHANGES_IN_REPO=$(git status --porcelain)
Expand All @@ -78,4 +76,7 @@ jobs:
uses: actions-rs/cargo@v1
with:
command: schema
args: --locked
args: --locked --manifest-path fetch/cosmwasm_contract/Cargo.toml

- name: Check for schema differences
run: git diff --exit-code
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
*.DS_store
*.idea
.idea
fetch/bridge.wasm
Binary file removed fetch/bridge.wasm
Binary file not shown.
Loading

0 comments on commit e9201af

Please sign in to comment.