From 9afba1223c9cc8d54f97e9a00302b518984a0ab4 Mon Sep 17 00:00:00 2001 From: Yaru Wang Date: Thu, 24 Aug 2023 15:54:16 +0200 Subject: [PATCH] test: add workflow trigger by gaia --- .github/workflows/test_for_gaia.yml | 63 +++++++++++++++++++++++++++++ 1 file changed, 63 insertions(+) create mode 100644 .github/workflows/test_for_gaia.yml diff --git a/.github/workflows/test_for_gaia.yml b/.github/workflows/test_for_gaia.yml new file mode 100644 index 0000000000..4afef7c09b --- /dev/null +++ b/.github/workflows/test_for_gaia.yml @@ -0,0 +1,63 @@ +name: Test Triggered by Gaia + +on: + repository_dispatch: + types: [ trigger-workflow ] + +env: + CARGO_INCREMENTAL: 0 + CARGO_PROFILE_DEV_DEBUG: 1 + CARGO_PROFILE_RELEASE_DEBUG: 1 + RUST_BACKTRACE: short + CARGO_NET_RETRY: 10 + RUSTUP_MAX_RETRIES: 10 + +# Cancel previous runs of this workflow when a new commit is added to the PR, branch or tag +concurrency: + group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} + cancel-in-progress: true + +jobs: + integration-test: + runs-on: ubuntu-20.04 + timeout-minutes: 180 + + steps: + - uses: actions/checkout@v3 + with: + fetch-depth: 0 + - uses: actions-rs/toolchain@v1 + with: + toolchain: stable + override: true + - uses: Swatinem/rust-cache@v2 + - uses: actions-rs/cargo@v1 + with: + command: test + args: -p ibc-integration-test --no-fail-fast --no-run + - uses: actions/setup-go@v4 + with: + go-version: 1.20.x + - name: Checkout hermes version + run: | + git checkout ${{ github.event.client_payload.hermes_version }} + - name: Fetch Gaia Repo + run: | + git clone --branch ${{ github.event.client_payload.gaiad_version }} https://github.com/cosmos/gaia.git + cd gaia + make build + cd ../ + - name: Make gaiad executable + run: chmod +x ${{ github.workspace }}/gaia/build/gaiad + - uses: nick-fields/retry@v2 + env: + RUST_LOG: info + RUST_BACKTRACE: 1 + NO_COLOR_LOG: 1 + CHAIN_COMMAND_PATHS: ${{ matrix.chain.command }} + ACCOUNT_PREFIXES: ${{ matrix.chain.account_prefix }} + with: + max_attempts: 2 + timeout_minutes: 90 + command: | + CHAIN_COMMAND_PATHS=${{ github.workspace }}/gaia/build/gaiad ACCOUNT_PREFIXES=cosmos cargo test -p ibc-integration-test -- tests::transfer::test_ibc_transfer