Skip to content

feat: IBC test framework support Axon #11

feat: IBC test framework support Axon

feat: IBC test framework support Axon #11

Workflow file for this run

name: IBC test
on:
pull_request:
paths:
- .github/workflows/ibc-test.yaml
- Cargo.toml
- Cargo.lock
- ci/**
- crates/**
- tools/**
push:
branches: main
- .github/workflows/ibc-test.yaml
- Cargo.toml
- Cargo.lock
- ci/**
- crates/**
- tools/**
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true
jobs:
ibc-test:
runs-on: ubuntu-20.04
timeout-minutes: 60
env:
SRC_DIR: ${{ github.workspace }}/ibc-test-src
strategy:
fail-fast: false
matrix:
chain_a:
- command: ckb
account_prefix: ckb
- command: axon
account_prefix: axon
chain_b:
- command: ckb
account_prefix: ckb
- command: axon
account_prefix: axon
steps:
- uses: actions/checkout@v3
- uses: actions-rs/toolchain@v1
with:
toolchain: stable
override: true
- uses: Swatinem/rust-cache@v1
- name: Set Node.js 16.x
uses: actions/setup-node@v3
with:
node-version: 16.x
- name: Install yarn
run: npm install --global yarn
- name: Create folder
run: mkdir -p $SRC_DIR
- uses: actions-rs/cargo@v1
with:
command: build
args: -p ibc-relayer
- name: Prepare CKB
run: |
if [ ! -f "/tmp/ckb.tar.gz" ]; then
curl -L https://github.com/nervosnetwork/ckb/releases/download/v0.107.0/ckb_v0.107.0_x86_64-unknown-linux-gnu.tar.gz -o /tmp/ckb.tar.gz
fi
tar -zxf /tmp/ckb.tar.gz -C /tmp
echo "/tmp/ckb_v0.107.0_x86_64-unknown-linux-gnu" >> $GITHUB_PATH
- name: Prepare Axon source
run: git clone -b forcerelay-test --single-branch --recursive https://github.com/axonweb3/axon.git $SRC_DIR/axon
- name: Install Axon
uses: actions-rs/cargo@v1
with:
command: install
args: --path ${{env.SRC_DIR}}/axon
- name: Prepare IBC contracts
run: git clone --recursive https://github.com/synapseweb3/ibc-solidity-contract.git $SRC_DIR/ibc-solidity-contract
- name: Compile IBC contracts
working-directory: ${{env.SRC_DIR}}/ibc-solidity-contract
run: yarn install && yarn compile
- uses: actions-rs/cargo@v1
env:
CHAIN_COMMAND_PATHS: ${{ matrix.chain_a.command }},${{ matrix.chain_b.command }}
ACCOUNT_PREFIXES: ${{ matrix.chain_a.account_prefix }},${{ matrix.chain_b.account_prefix }}
AXON_SRC_PATH: ${{env.SRC_DIR}}/axon
IBC_CONTRACTS_SRC_PATH: ${{env.SRC_DIR}}/ibc-solidity-contract
RUST_LOG: info
RUST_BACKTRACE: 1
with:
command: test
args: -p ibc-test --all-features -- --nocapture