Skip to content

Try and enable wasm tests #15

Try and enable wasm tests

Try and enable wasm tests #15

Workflow file for this run

name: babylonchain/babylon-contract/wasm-tests
on:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]
env:
CARGO_TERM_COLOR: always
WORKSPACE: "/home/runner/work/babylon-contract/babylon-contract"
AWS_ACCESS_KEY_ID: xxxxYKF5
AWS_REGION: xxxxst-1
AWS_SECRET_ACCESS_KEY: xxxxmvcn
S3_BUCKET_PREFIX: xxxxract
jobs:
wasm-build-check-integration:
runs-on: ubuntu-latest
steps:
- uses: actions/[email protected]
- name: Build optimised Wasm binaries
run: "./scripts/build-optimizer-ci.sh"
- name: List optimised Wasm binaries
run: bash -c "ls $WORKSPACE/artifacts/*.wasm"
- name: Install cosmwasm-check
run: cargo install --locked --debug --version ^2.0 cosmwasm-check
- name: Check the Wasm binaries' validity
run: bash -c "cosmwasm-check $WORKSPACE/artifacts/*.wasm"
- name: Integration tests based on CosmWasm
run: cargo test --test integration
- uses: actions/[email protected]
with:
path: |-
"$WORKSPACE/artifacts/babylon_contract.wasm"
"$WORKSPACE/artifacts/btc_staking.wasm"
push-to-s3:
runs-on: ubuntu-latest
needs:
- wasm-build-check-integration
steps:
- uses: actions/[email protected]
with:
path: "/tmp"
- uses: aws-actions/[email protected]
with:
aws-region: "${{ env.AWS_REGION }}"
aws-access-key-id: "${{ secrets.AWS_ACCESS_KEY_ID }}"
aws-secret-access-key: "${{ secrets.AWS_SECRET_ACCESS_KEY }}"
- run: aws s3 cp /tmp/babylon_contract.wasm $S3_BUCKET_PREFIX/${{ github.repository }}-${{ github.sha }}.wasm