From 6e9ef1c8ee6766cc7c0fa43aac67921cb305e461 Mon Sep 17 00:00:00 2001 From: jjy Date: Thu, 24 Aug 2023 17:23:34 +0800 Subject: [PATCH] test(ci): enable matrix test of ckb and axon --- .github/workflows/ibc-test.yaml | 45 +++++++++++++-------------------- 1 file changed, 18 insertions(+), 27 deletions(-) diff --git a/.github/workflows/ibc-test.yaml b/.github/workflows/ibc-test.yaml index 81e1cc01e..ffa3e8b0f 100644 --- a/.github/workflows/ibc-test.yaml +++ b/.github/workflows/ibc-test.yaml @@ -22,9 +22,24 @@ concurrency: cancel-in-progress: true jobs: - ibc-test-ckb: + ibc-test: runs-on: ubuntu-20.04 timeout-minutes: 60 + env: + SRC_DIR: ./tmp/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 @@ -43,30 +58,6 @@ jobs: fi tar -zxf /tmp/ckb.tar.gz -C /tmp echo "/tmp/ckb_v0.107.0_x86_64-unknown-linux-gnu" >> $GITHUB_PATH - - uses: actions-rs/cargo@v1 - env: - CHAIN_COMMAND_PATHS: ckb - ACCOUNT_PREFIXES: ckb - RUST_LOG: info - with: - command: test - args: -p ibc-test --all-features -- --nocapture - ibc-test-axon: - runs-on: ubuntu-20.04 - timeout-minutes: 60 - env: - SRC_DIR: ./tmp/ibc-test-src - steps: - - uses: actions/checkout@v3 - - uses: actions-rs/toolchain@v1 - with: - toolchain: stable - override: true - - uses: Swatinem/rust-cache@v1 - - uses: actions-rs/cargo@v1 - with: - command: build - args: -p ibc-relayer - name: Create folder run: mkdir -p $SRC_DIR - name: Prepare Axon source @@ -94,8 +85,8 @@ jobs: dir: ${{env.SRC_DIR}}/ibc-solidity-contract - uses: actions-rs/cargo@v1 env: - CHAIN_COMMAND_PATHS: axon - ACCOUNT_PREFIXES: axon + 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