Skip to content

IBC transfer service - WIP #363

IBC transfer service - WIP

IBC transfer service - WIP #363

Workflow file for this run

name: build and test
on:
push:
branches: [main]
pull_request:
branches: [main]
# Ensures that only a single workflow per PR will run at a time. Cancels in-progress jobs if new commit is pushed.
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true
env:
RUSTFLAGS: "-Dwarnings"
GO_VERSION: 1.21
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Run cargo fmt
run: cargo fmt --all -- --check
- name: Run clippy
run: cargo clippy --all-targets --verbose -- -D warnings
- name: Optimize contracts
run: |
docker run --user $(id -u):$(id -g) --rm \
-v .:/code -v ./target:/target \
-v ./target:/usr/local/cargo/registry cosmwasm/optimizer:0.16.0
- name: List artifact contents
run: ls -l ./artifacts
- name: Upload wasm artifacts
uses: actions/upload-artifact@v3
with:
name: optimized-contracts
path: ./artifacts/*.wasm
if-no-files-found: error
- name: Install local-ic
run: git clone https://github.com/strangelove-ventures/interchaintest && cd interchaintest/local-interchain && make install
- name: Upload local-ic artifact
uses: actions/upload-artifact@v3
with:
name: local-ic
path: ~/go/bin/local-ic
tests:
needs: build
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Get cargo
uses: actions-rs/toolchain@v1
with:
toolchain: stable
- name: Download artifacts
uses: actions/download-artifact@v3
with:
name: optimized-contracts
path: ./artifacts
- name: List downloaded files
run: ls -l ./artifacts
- name: Run tests
run: cargo test --verbose
env:
RUST_BACKTRACE: 1
local-ic-polytone:
needs: build
name: authorization & processor polytone integration test
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Get cargo
uses: actions-rs/toolchain@v1
with:
toolchain: stable
- name: Download artifacts
uses: actions/download-artifact@v3
with:
name: optimized-contracts
path: ./artifacts
- name: List downloaded files
run: ls -l ./artifacts
- name: Download local-ic artifact
uses: actions/download-artifact@v3
with:
name: local-ic
path: /tmp
- name: Make local-ic executable
run: chmod +x /tmp/local-ic
- name: Start local-ic and wait for it to be ready
run: |
cd local-interchaintest
/tmp/local-ic start neutron_juno --api-port 42069 &
curl --head -X GET --retry 200 --retry-connrefused --retry-delay 5 http://localhost:42069
- name: Run polytone example
env:
RUST_LOG: debug
run: cargo run --package local-interchaintest --example polytone
- name: Cleanup
run: killall local-ic && exit 0
local-ic-token-swap:
needs: build
name: token swap e2e test
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Get cargo
uses: actions-rs/toolchain@v1
with:
toolchain: stable
- name: Download artifacts
uses: actions/download-artifact@v3
with:
name: optimized-contracts
path: ./artifacts
- name: List downloaded files
run: ls -l ./artifacts
- name: Download local-ic artifact
uses: actions/download-artifact@v3
with:
name: local-ic
path: /tmp
- name: Make local-ic executable
run: chmod +x /tmp/local-ic
- name: Start local-ic and wait for it to be ready
run: |
cd local-interchaintest
/tmp/local-ic start neutron_juno --api-port 42069 &
curl --head -X GET --retry 200 --retry-connrefused --retry-delay 5 http://localhost:42069
- name: Run token_swap example
env:
RUST_LOG: debug
run: cargo run --package local-interchaintest --example token_swap
- name: Cleanup
run: killall local-ic && exit 0
local-ic-ibc-transfer-ntrn-juno:
needs: build
name: IBC transfer NTRN->JUNO e2e test
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Get cargo
uses: actions-rs/toolchain@v1
with:
toolchain: stable
- name: Download artifacts
uses: actions/download-artifact@v3
with:
name: optimized-contracts
path: ./artifacts
- name: List downloaded files
run: ls -l ./artifacts
- name: Download local-ic artifact
uses: actions/download-artifact@v3
with:
name: local-ic
path: /tmp
- name: Make local-ic executable
run: chmod +x /tmp/local-ic
- name: Start local-ic and wait for it to be ready
run: |
cd local-interchaintest
/tmp/local-ic start neutron_juno --api-port 42069 &
curl --head -X GET --retry 200 --retry-connrefused --retry-delay 5 http://localhost:42069
- name: Run IBC transfer NTRN->JUNO example
env:
RUST_LOG: debug
run: cargo run --package local-interchaintest --example ibc_transfer_ntrn_juno
- name: Cleanup
run: killall local-ic && exit 0
local-ic-ibc-transfer-juno-ntrn:
needs: build
name: IBC transfer JUNO->NTRN e2e test
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Get cargo
uses: actions-rs/toolchain@v1
with:
toolchain: stable
- name: Download artifacts
uses: actions/download-artifact@v3
with:
name: optimized-contracts
path: ./artifacts
- name: List downloaded files
run: ls -l ./artifacts
- name: Download local-ic artifact
uses: actions/download-artifact@v3
with:
name: local-ic
path: /tmp
- name: Make local-ic executable
run: chmod +x /tmp/local-ic
- name: Start local-ic and wait for it to be ready
run: |
cd local-interchaintest
/tmp/local-ic start neutron_juno --api-port 42069 &
curl --head -X GET --retry 200 --retry-connrefused --retry-delay 5 http://localhost:42069
- name: Run IBC transfer JUNO->NTRN example
env:
RUST_LOG: debug
run: cargo run --package local-interchaintest --example ibc_transfer_juno_ntrn
- name: Cleanup
run: killall local-ic && exit 0
local-ic-ibc-transfer-ntrn-juno-gaia-pfm:
needs: build
name: IBC transfer NTRN->JUNO->GAIA PFM e2e test
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Get cargo
uses: actions-rs/toolchain@v1
with:
toolchain: stable
- name: Download artifacts
uses: actions/download-artifact@v3
with:
name: optimized-contracts
path: ./artifacts
- name: List downloaded files
run: ls -l ./artifacts
- name: Download local-ic artifact
uses: actions/download-artifact@v3
with:
name: local-ic
path: /tmp
- name: Make local-ic executable
run: chmod +x /tmp/local-ic
- name: Start local-ic and wait for it to be ready
run: |
cd local-interchaintest
/tmp/local-ic start neutron_juno --api-port 42069 &
curl --head -X GET --retry 200 --retry-connrefused --retry-delay 5 http://localhost:42069
- name: Run IBC transfer NTRN->JUNO example
env:
RUST_LOG: debug
run: cargo run --package local-interchaintest --example ibc_transfer_ntrn_juno_gaia_pfm
- name: Cleanup
run: killall local-ic && exit 0
local-ic-ibc-transfer-juno-gaia-ntrn-pfm:
needs: build
name: IBC transfer JUNO->GAIA->NTRN PFM e2e test
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Get cargo
uses: actions-rs/toolchain@v1
with:
toolchain: stable
- name: Download artifacts
uses: actions/download-artifact@v3
with:
name: optimized-contracts
path: ./artifacts
- name: List downloaded files
run: ls -l ./artifacts
- name: Download local-ic artifact
uses: actions/download-artifact@v3
with:
name: local-ic
path: /tmp
- name: Make local-ic executable
run: chmod +x /tmp/local-ic
- name: Start local-ic and wait for it to be ready
run: |
cd local-interchaintest
/tmp/local-ic start neutron_juno --api-port 42069 &
curl --head -X GET --retry 200 --retry-connrefused --retry-delay 5 http://localhost:42069
- name: Run IBC transfer NTRN->JUNO example
env:
RUST_LOG: debug
run: cargo run --package local-interchaintest --example ibc_transfer_juno_gaia_ntrn_pfm
- name: Cleanup
run: killall local-ic && exit 0