Skip to content

create channel typo #118

create channel typo

create channel typo #118

name: Test Patch Upgrades
on:
# workflow_dispatch:
# schedule:
# At 15:30 on Monday.
# - cron: '30 15 * * 1'
# pull_request:
# types:
# - opened
# - closed
push:
paths-ignore:
- 'docs/**'
- 'examples/**'
- 'logs/**'
- '!examples/inventory-local.yml'
- 'README.md'
jobs:
set-version-matrix:
runs-on: ubuntu-22.04
steps:
- name: Check out repository code
uses: actions/checkout@v3
- name: Set up Python
uses: actions/setup-python@v3
- name: Install dependencies
run: |
python -m pip install --upgrade pip
python -m pip install requests
- name: Obtain latest non-rc release
id: set-start
run: |
versions=$(tests/patch_upgrade_matrix.py)
echo $versions
echo "matrix=$versions" >> $GITHUB_OUTPUT
outputs:
version_matrix: ${{ steps.set-start.outputs.matrix }}
patch-upgrade:
runs-on: ubuntu-22.04
needs: set-version-matrix
strategy:
matrix:
${{ fromJSON(needs.set-version-matrix.outputs.version_matrix) }}
fail-fast: false
environment: patch-upgrade-workflow
env:
PROVIDER_SERVICE_1: ${{ vars.PROVIDER_SERVICE_1 }}
PROVIDER_SERVICE_2: ${{ vars.PROVIDER_SERVICE_2 }}
CHAIN_BINARY: ${{ vars.CHAIN_BINARY }}
HOME_1: ${{ vars.HOME_1 }}
HOME_2: ${{ vars.HOME_2 }}
CHAIN_ID: ${{ vars.CHAIN_ID }}
MONIKER_1: ${{ vars.MONIKER_1 }}
MONIKER_2: ${{ vars.MONIKER_2 }}
MNEMONIC_1: ${{ vars.MNEMONIC_1 }}
MNEMONIC_2: ${{ vars.MNEMONIC_2 }}
DENOM: ${{ vars.DENOM }}
VAL_FUNDS: ${{ vars.VAL_FUNDS }}
VAL_STAKE: ${{ vars.VAL_STAKE }}
VAL_STAKE_STEP: ${{ vars.VAL_STAKE_STEP }}
VOTING_PERIOD: ${{ vars.VOTING_PERIOD }}
VAL1_RPC_PORT: ${{ vars.VAL1_RPC_PORT }}
VAL2_RPC_PORT: ${{ vars.VAL2_RPC_PORT }}
WALLET_1: ${{ vars.WALLET_1 }}
WALLET_2: ${{ vars.WALLET_2 }}
VALOPER_1: ${{ vars.VALOPER_1 }}
CONSUMER_CHAIN_BINARY_URL: ${{ vars.CONSUMER_CHAIN_BINARY_URL }}
CONSUMER_CHAIN_BINARY: ${{ vars.CONSUMER_CHAIN_BINARY }}
CONSUMER_HOME_1: ${{ vars.CONSUMER_HOME_1 }}
CONSUMER_HOME_2: ${{ vars.CONSUMER_HOME_2 }}
CONSUMER_DENOM: ${{ vars.CONSUMER_DENOM }}
CON1_RPC_PORT: ${{ vars.CON1_RPC_PORT }}
CON2_RPC_PORT: ${{ vars.CON2_RPC_PORT }}
CONSUMER_SERVICE_1: ${{ vars.CONSUMER_SERVICE_1 }}
CONSUMER_SERVICE_2: ${{ vars.CONSUMER_SERVICE_2 }}
steps:
- name: start-version
run: echo ${{matrix.start_version}}
- name: target-version
run: echo ${{matrix.target_branch}}
- name: upgrade-coverage
run: echo ${{matrix.upgrade_coverage}}
- name: Target RC
if: ${{ contains(matrix.target_branch, 'rc') }}
run: |
echo "${{matrix.target_branch}}"
- name: Target commit
if: ${{ !contains(matrix.target_branch, 'rc') }}
run: |
BUILD_TAG=gaiad-linux-${{matrix.target_branch}}
TARGET_COMMIT=$(curl -s -L -H "Accept: application/vnd.github+json" -H "X-GitHub-Api-Version: 2022-11-28" https://api.github.com/repos/hyphacoop/cosmos-builds/releases/tags/$BUILD_TAG | jq -r '.name')
echo $TARGET_COMMIT
- name: Consumer chain binary URL
run: echo $CONSUMER_CHAIN_BINARY_URL
- name: Update PATH
run: |
echo "$HOME/go/bin" >> $GITHUB_PATH
echo "$HOME/.hermes" >> $GITHUB_PATH
- name: Bypass the grub-efi-amd64-signed package
run: sudo apt-mark hold grub-efi-amd64-signed
- run: echo "Test upgrading ${{matrix.start_version}} to ${{matrix.target_branch}}"
- name: Check out repository code
uses: actions/checkout@v3
- name: Set up Python
uses: actions/setup-python@v3
with:
python-version: '3.10'
- name: Install dependencies
run: |
python -m pip install --upgrade pip
python -m pip install requests toml-cli
- name: Start chains
env:
START_VERSION: ${{matrix.start_version}}
run: tests/start-chains.sh
- name: blocks-1
run: tests/test_block_production.sh 127.0.0.1 $VAL1_RPC_PORT
- name: signatures-1
run: tests/test-signatures.sh $VAL1_RPC_PORT 2 # two validators
- name: txs-1
run: tests/test-tx-fresh.sh
- name: api-1
run: tests/test_endpoints_api.sh localhost 25001
- name: rpc-1
run: tests/test_endpoints_rpc.sh localhost $VAL1_RPC_PORT
- name: Set up relayer
run: tests/setup-relayer.sh
- name: Initialize consumer chain a
env:
CONSUMER_CHAIN_ID: consumera
run: tests/init-consumer.sh
- name: Launch consumer chain a
env:
CONSUMER_CHAIN_ID: consumera
run: tests/launch-consumer.sh 1
- name: consumera-blocks-1
run: tests/test_block_production.sh 127.0.0.1 $CON1_RPC_PORT
- name: consumera-signatures-1
run: tests/test-signatures.sh $CON1_RPC_PORT 2 # two validators
# - name: Set up relayer for consumer chain 1
# env:
# CONSUMER_CHAIN_ID: consumera
# run: tests/setup-relayer.sh 07-tendermint-0
- name: Establish CCV channel for consumer a
run: |
hermes create connection --a-chain consumera --a-client 07-tendermint-0 --b-client 07-tendermint-0
hermes create channel --a-chain consumera --a-port consumer --b-port provider --order ordered --a-connection connection-0 --channel-version 1
systemctl restart hermes
sleep 10
- name: consumera-vsc-1
run: tests/test-ccv.sh
- name: consumera-ibc-1
env:
CONSUMER_CHAIN_ID: consumera
run: tests/test-ibc-transfer.sh channel-1 2
- name: consumera-key
env:
CONSUMER_CHAIN_ID: consumera
run: tests/test-key-assignment.sh
- name: blocks-2
run: tests/test_block_production.sh 127.0.0.1 $VAL1_RPC_PORT
- name: signatures-2
run: tests/test-signatures.sh $CON1_RPC_PORT 2 # two validators
- name: Stop consumer chain
env:
CONSUMER_CHAIN_ID: consumera
run: tests/stop-consumer.sh 2
- name: consumera-remove
run: tests/test-consumer-removed.sh
- name: blocks-3
run: tests/test_block_production.sh 127.0.0.1 $VAL1_RPC_PORT
- name: signatures-3
run: tests/test-signatures.sh $VAL1_RPC_PORT 2 # two validators
# - name: Full upgrade to rc build
# if: ${{ contains(matrix.target_branch, 'rc') && matrix.upgrade_coverage == 'full' }}
# env:
# UPGRADE_BINARY_URL: https://github.com/cosmos/gaia/releases/download/${{matrix.target_branch}}/gaiad-${{matrix.target_branch}}-linux-amd64
# run: tests/test-full-upgrade.sh
# - name: Full upgrade to branch build
# if: ${{ !contains(matrix.target_branch, 'rc') && matrix.upgrade_coverage == 'full' }}
# env:
# UPGRADE_BINARY_URL: https://github.com/hyphacoop/cosmos-builds/releases/download/gaiad-linux-${{matrix.target_branch}}/gaiad-linux
# run: tests/test-full-upgrade.sh
# - name: Partial upgrade to rc build
# if: ${{ contains(matrix.target_branch, 'rc') && matrix.upgrade_coverage == 'partial' }}
# env:
# UPGRADE_BINARY_URL: https://github.com/cosmos/gaia/releases/download/${{matrix.target_branch}}/gaiad-${{matrix.target_branch}}-linux-amd64
# run: tests/test-partial-upgrade.sh
# - name: Partial upgrade to branch build
# if: ${{ !contains(matrix.target_branch, 'rc') && matrix.upgrade_coverage == 'partial'}}
# env:
# UPGRADE_BINARY_URL: https://github.com/hyphacoop/cosmos-builds/releases/download/gaiad-linux-${{matrix.target_branch}}/gaiad-linux
# run: tests/test-partial-upgrade.sh
# - name: blocks-4
# run: tests/test_block_production.sh 127.0.0.1 $VAL1_RPC_PORT
# - name: signatures-4
# run: tests/test-signatures.sh $VAL1_RPC_PORT 2 # two validators
# - name: txs-2
# run: tests/test-tx-fresh.sh
# - name: api-2
# run: tests/test_endpoints_api.sh localhost 25001
# - name: rpc-2
# run: tests/test_endpoints_rpc.sh localhost $VAL1_RPC_PORT
# - name: Initialize consumer chain 2
# env:
# CONSUMER_CHAIN_ID: consumer2
# run: tests/init-consumer.sh
# - name: Launch consumer chain 2
# env:
# CONSUMER_CHAIN_ID: consumer2
# run: tests/launch-consumer.sh 3
# - name: consumer2-blocks
# run: tests/test_block_production.sh 127.0.0.1 $CON1_RPC_PORT
# - name: consumer2-signatures
# run: tests/test-signatures.sh $CON1_RPC_PORT 2 # two validators
# - name: Set up relayer for consumer chain 2
# env:
# CONSUMER_CHAIN_ID: consumer2
# run: tests/setup-relayer.sh 07-tendermint-1
# - name: consumer2-ccv
# run: tests/test-ccv.sh
# - name: consumer2-ibc
# run: tests/test-ibc-transfer.sh channel-3 3
# - name: Stop consumer chain
# env:
# CONSUMER_CHAIN_ID: consumer2
# run: tests/stop-consumer.sh 4
# - name: consumer2-remove
# run: tests/test-consumer-removed.sh
# - name: blocks-5
# run: tests/test_block_production.sh 127.0.0.1 $VAL1_RPC_PORT
# - name: signatures-5
# run: tests/test-signatures.sh $VAL1_RPC_PORT 2 # two validators