Skip to content

Commit

Permalink
Merge pull request #7 from CosmWasm/sylvia_1_2_1
Browse files Browse the repository at this point in the history
Update to Sylvia 1.2.1
  • Loading branch information
jawoznia authored Aug 23, 2024
2 parents 334b65e + ec200be commit c416c0c
Show file tree
Hide file tree
Showing 7 changed files with 70 additions and 1,014 deletions.
File renamed without changes.
38 changes: 30 additions & 8 deletions .github/workflows/generate.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,18 +8,40 @@ jobs:
env:
PROJECT_NAME: project-foo
steps:
- uses: actions/checkout@v4
- uses: cargo-generate/cargo-generate-action@latest
- name: Checkout source
uses: actions/checkout@v4
- name: Generate project
uses: cargo-generate/cargo-generate-action@latest
with:
name: ${{ env.PROJECT_NAME }}
- uses: actions-rs/toolchain@v1
- name: Install Rust
uses: actions-rs/toolchain@v1
with:
toolchain: stable
target: wasm32-unknown-unknown
profile: minimal
override: true
components: rustfmt, clippy
# we need to move the generated project to a temp folder, away from the template project
# otherwise `cargo` runs would fail
# see https://github.com/rust-lang/cargo/issues/9922
- run: |
mv $PROJECT_NAME ${{ runner.temp }}/
cd ${{ runner.temp }}/$PROJECT_NAME
cargo check
cargo test
- name: Move generated project to temp folder
run: mv $PROJECT_NAME ${{ runner.temp }}/
- name: Test project
working-directory: ${{ runner.temp }}/${{ env.PROJECT_NAME }}
run: cargo test
- name: Clippy project
working-directory: ${{ runner.temp }}/${{ env.PROJECT_NAME }}
run: cargo clippy --all-targets -- -D warnings
- name: Fmt check project
working-directory: ${{ runner.temp }}/${{ env.PROJECT_NAME }}
run: cargo fmt --check
- name: Build WASM binary
working-directory: ${{ runner.temp }}/${{ env.PROJECT_NAME }}
run: cargo wasm
- name: Install cosmwasm-check
working-directory: ${{ runner.temp }}/${{ env.PROJECT_NAME }}
run: cargo install cosmwasm-check
- name: Check contracts
working-directory: ${{ runner.temp }}/${{ env.PROJECT_NAME }}
run: cosmwasm-check target/wasm32-unknown-unknown/release/*.wasm
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
/target
/schema
Cargo.lock
Loading

0 comments on commit c416c0c

Please sign in to comment.