Manager multichain and workflow config builder #387
Workflow file for this run
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
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: Set up Go | |
uses: actions/setup-go@v4 | |
with: | |
go-version: ${{ env.GO_VERSION }} | |
- 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: Set up Go | |
uses: actions/setup-go@v4 | |
with: | |
go-version: ${{ env.GO_VERSION }} | |
- 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-2-party-pol-astroport-neutron: | |
needs: build | |
name: 2 party POL Astroport on Neutron e2e test | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Set up Go | |
uses: actions/setup-go@v4 | |
with: | |
go-version: ${{ env.GO_VERSION }} | |
- 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 2 party POL Astroport on Neutron example | |
env: | |
RUST_LOG: debug | |
run: cargo run --package local-interchaintest --example two_party_pol_astroport_neutron | |
- name: Cleanup | |
run: killall local-ic && exit 0 |