Add integration test for testing client recovery #312
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: Integration tests | |
on: | |
pull_request: | |
push: | |
branches: | |
- main | |
jobs: | |
cleanup-runs: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: rokroskar/workflow-run-cleanup-action@master | |
env: | |
GITHUB_TOKEN: "${{ secrets.GITHUB_TOKEN }}" | |
if: ${{ !startsWith(github.ref, 'refs/tags/') && github.ref != 'refs/heads/master' }} | |
ibc-integration: | |
runs-on: ubuntu-latest | |
env: | |
COMETBFT_VERSION: 0.37.1 | |
GAIA_VERSION: 7.1.1 | |
HERMES_VERSION: 1.8.0 | |
GRPCURL_VERSION: 1.8.7 | |
RUST_VERSION: 1.65 | |
IBC_COMMITISH: master | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Download CometBFT | |
uses: dsaltares/fetch-gh-release-asset@master | |
with: | |
repo: cometbft/cometbft | |
version: "tags/v${{ env.COMETBFT_VERSION }}" | |
file: "cometbft_${{ env.COMETBFT_VERSION }}_linux_amd64.tar.gz" | |
- name: Download Gaia | |
uses: dsaltares/fetch-gh-release-asset@master | |
with: | |
repo: cosmos/gaia | |
version: "tags/v${{ env.GAIA_VERSION }}" | |
file: "gaiad-v${{ env.GAIA_VERSION }}-linux-amd64" | |
- name: Download Hermes | |
uses: dsaltares/fetch-gh-release-asset@master | |
with: | |
repo: informalsystems/hermes | |
version: "tags/v${{ env.HERMES_VERSION }}" | |
file: "hermes-v${{ env.HERMES_VERSION }}-x86_64-unknown-linux-gnu.tar.gz" | |
- name: Download grpcurl | |
uses: dsaltares/fetch-gh-release-asset@master | |
with: | |
repo: fullstorydev/grpcurl | |
version: "tags/v${{ env.GRPCURL_VERSION }}" | |
file: "grpcurl_${{ env.GRPCURL_VERSION}}_linux_x86_64.tar.gz" | |
- name: Setup scripts and directories | |
working-directory: ci/ | |
run: | | |
echo "${HOME}" | |
mkdir -p ~/local/bin | |
cp entrypoint.sh ~/local/bin | |
mkdir -p ~/.cometbft | |
cp -r cometbft-config/ ~/.cometbft/config | |
mkdir -p ~/.hermes | |
cp hermes-config.toml ~/.hermes/config.toml | |
cp hermes-config-recovery.toml ~/.hermes/recovery-config.toml | |
cp one-chain ~ | |
cp user_seed.json ~ | |
cp Makefile .. | |
cp -r tests/ ~ | |
- name: Download and setup binaries | |
run: | | |
tar -xzf "cometbft_${COMETBFT_VERSION}_linux_amd64.tar.gz" | |
mv "gaiad-v${GAIA_VERSION}-linux-amd64" gaiad | |
tar -xzf "hermes-v${HERMES_VERSION}-x86_64-unknown-linux-gnu.tar.gz" | |
tar -xzf "grpcurl_${GRPCURL_VERSION}_linux_x86_64.tar.gz" | |
cargo install --path . | |
chmod +x cometbft gaiad hermes grpcurl basecoin | |
mv cometbft gaiad hermes grpcurl basecoin ~/local/bin | |
- name: Update environment path | |
run: | | |
echo "${HOME}/local/bin" >> $GITHUB_PATH | |
- name: Validate binaries | |
run: | | |
cometbft version | |
gaiad version | |
hermes version | |
grpcurl -version | |
basecoin version | |
- uses: actions/cache@v3 | |
with: | |
path: | | |
~/.cargo | |
target | |
~/build | |
key: ${{ runner.os }}-rust-${{ hashFiles('**/Cargo.lock') }} | |
restore-keys: | | |
${{ runner.os }}-rust- | |
- uses: actions-rs/toolchain@v1 | |
with: | |
toolchain: stable | |
override: true | |
- name: Set environment variables | |
run: | | |
echo "BASECOIN_SRC=$(pwd)" >> $GITHUB_ENV | |
echo "LOG_DIR=$(pwd)/log" >> $GITHUB_ENV | |
- name: Run integration tests | |
working-directory: ~ | |
run: | | |
mkdir -p "${LOG_DIR}" | |
entrypoint.sh make test -j4 |