diff --git a/.github/workflows/multichain-e2e-template.yml b/.github/workflows/multichain-e2e-template.yml index 32cc3f6594a..eac801343c2 100644 --- a/.github/workflows/multichain-e2e-template.yml +++ b/.github/workflows/multichain-e2e-template.yml @@ -97,7 +97,7 @@ jobs: working-directory: ./agoric-sdk/multichain-testing - name: Run @agoric/multichain-testing E2E Tests - run: yarn ${{ inputs.test_command }} + run: ${{ inputs.test_command }} working-directory: ./agoric-sdk/multichain-testing env: FILE: ${{ inputs.config }} diff --git a/.github/workflows/multichain-e2e.yml b/.github/workflows/multichain-e2e.yml index bb86c2d7ffc..eb9ccb278e7 100644 --- a/.github/workflows/multichain-e2e.yml +++ b/.github/workflows/multichain-e2e.yml @@ -2,19 +2,52 @@ name: Multichain E2E Tests on: workflow_dispatch: + inputs: + test_type: + description: 'Select which test to run' + type: choice + required: true + options: + - orchestration-api-hermes + - fast-usdc-hermes + - orchestration-api-go-relayer + - fast-usdc-go-relayer workflow_call: jobs: orchestration-api-test: - name: Multichain E2E (Orchestration API) + name: Multichain E2E (Orchestration API - Hermes) + if: | + github.event_name == 'workflow_call' || + (github.event_name == 'workflow_dispatch' && inputs.test_type == 'orchestration-api-hermes') uses: ./.github/workflows/multichain-e2e-template.yml with: config: config.yaml - test_command: test:main + test_command: yarn test:main fast-usdc-test: - name: Multichain E2E (Fast USDC) + name: Multichain E2E (Fast USDC - Hermes) + if: | + github.event_name == 'workflow_call' || + (github.event_name == 'workflow_dispatch' && inputs.test_type == 'fast-usdc-hermes') uses: ./.github/workflows/multichain-e2e-template.yml with: config: config.fusdc.yaml - test_command: test:fast-usdc + test_command: yarn test:fast-usdc + + # Below jobs run on dispatch only + orchestration-api-go-relayer-test: + name: Multichain E2E (Orchestration API - Go Relayer) + if: github.event_name == 'workflow_dispatch' && inputs.test_type == 'orchestration-api-go-relayer' + uses: ./.github/workflows/multichain-e2e-template.yml + with: + config: config.go-relayer.yaml + test_command: RELAYER_TYPE=go-relayer yarn test:main + + fast-usdc-go-relayer-test: + name: Multichain E2E (Fast USDC - Go Relayer) + if: github.event_name == 'workflow_dispatch' && inputs.test_type == 'fast-usdc-go-relayer' + uses: ./.github/workflows/multichain-e2e-template.yml + with: + config: config.fusdc.go-relayer.yaml + test_command: RELAYER_TYPE=go-relayer yarn test:fast-usdc diff --git a/multichain-testing/README.md b/multichain-testing/README.md index 46a3a62177b..b2fd0ba8bcc 100644 --- a/multichain-testing/README.md +++ b/multichain-testing/README.md @@ -96,7 +96,7 @@ kubectl logs hermes-osmosis-cosmoshub-0 --container=relayer --follow ```sh # run tests with go-relayer configuration -make start FILE=config.gorelayer.yaml +make start FILE=config.go-relayer.yaml RELAYER_TYPE=go-relayer yarn test ``` diff --git a/multichain-testing/config.fusdc.go-relayer.yaml b/multichain-testing/config.fusdc.go-relayer.yaml new file mode 100644 index 00000000000..e69d6a55ba2 --- /dev/null +++ b/multichain-testing/config.fusdc.go-relayer.yaml @@ -0,0 +1,112 @@ +name: agoric-multichain-testing-fusdc-go-relayer +version: 0.2.20 + +chains: + - id: agoriclocal + name: agoric + image: ghcr.io/agoric/agoric-sdk:dev + numValidators: 1 + env: + - name: DEBUG + value: SwingSet:vat,SwingSet:ls + genesis: + app_state: + staking: + params: + unbonding_time: '2m' + swingset: + params: + bootstrap_vat_config: '@agoric/vm-config/decentral-itest-orchestration-config.json' + scripts: + updateConfig: + file: scripts/update-config.sh + faucet: + enabled: true + type: starship + ports: + rest: 1317 + rpc: 26657 + exposer: 38087 + grpc: 9090 + faucet: 8082 + resources: + cpu: 1 + memory: 4Gi + - id: osmosislocal + name: osmosis + numValidators: 1 + genesis: + app_state: + staking: + params: + unbonding_time: '2m' + interchain_accounts: + host_genesis_state: + params: + host_enabled: true + allow_messages: ['*'] + interchainquery: + host_port: 'icqhost' + params: + host_enabled: true + allow_queries: + - /cosmos.bank.v1beta1.Query/Balance + - /cosmos.bank.v1beta1.Query/AllBalances + faucet: + enabled: true + type: starship + ports: + rest: 1315 + rpc: 26655 + grpc: 9093 + faucet: 8084 + resources: + cpu: 1 + memory: 1Gi + - id: noblelocal + name: noble + numValidators: 1 + genesis: + app_state: + staking: + params: + unbonding_time: '2m' + faucet: + enabled: true + type: starship + ports: + rest: 1314 + rpc: 26654 + grpc: 9092 + faucet: 8083 + resources: + cpu: 1 + memory: 1Gi + +relayers: + - name: osmosis-noble + type: go-relayer + replicas: 1 + chains: + - osmosislocal + - noblelocal + - name: agoric-osmosis + type: go-relayer + replicas: 1 + chains: + - agoriclocal + - osmosislocal + - name: agoric-noble + type: go-relayer + replicas: 1 + chains: + - agoriclocal + - noblelocal + +explorer: + enabled: false + +registry: + enabled: true + ports: + rest: 8081 diff --git a/multichain-testing/config.fusdc.yaml b/multichain-testing/config.fusdc.yaml index c542d208386..aeca4b59785 100644 --- a/multichain-testing/config.fusdc.yaml +++ b/multichain-testing/config.fusdc.yaml @@ -21,12 +21,14 @@ chains: updateConfig: file: scripts/update-config.sh faucet: - enabled: false + enabled: true + type: starship ports: rest: 1317 rpc: 26657 exposer: 38087 grpc: 9090 + faucet: 8082 resources: cpu: 1 memory: 4Gi diff --git a/multichain-testing/config.go-relayer.yaml b/multichain-testing/config.go-relayer.yaml new file mode 100644 index 00000000000..1ac6ecde64d --- /dev/null +++ b/multichain-testing/config.go-relayer.yaml @@ -0,0 +1,117 @@ +name: agoric-multichain-testing-go-relayer +version: 0.2.20 + +chains: + - id: agoriclocal + name: agoric + image: ghcr.io/agoric/agoric-sdk:dev + numValidators: 1 + env: + - name: DEBUG + value: SwingSet:vat,SwingSet:ls + genesis: + app_state: + staking: + params: + unbonding_time: '2m' + swingset: + params: + bootstrap_vat_config: '@agoric/vm-config/decentral-itest-orchestration-config.json' + scripts: + updateConfig: + file: scripts/update-config.sh + faucet: + enabled: true + type: starship + ports: + rest: 1317 + rpc: 26657 + exposer: 38087 + grpc: 9090 + faucet: 8082 + resources: + cpu: 1 + memory: 4Gi + - id: osmosislocal + name: osmosis + numValidators: 1 + genesis: + app_state: + staking: + params: + unbonding_time: '2m' + interchain_accounts: + host_genesis_state: + params: + host_enabled: true + allow_messages: ['*'] + interchainquery: + host_port: 'icqhost' + params: + host_enabled: true + allow_queries: + - /cosmos.bank.v1beta1.Query/Balance + - /cosmos.bank.v1beta1.Query/AllBalances + faucet: + enabled: true + type: starship + ports: + rest: 1315 + rpc: 26655 + grpc: 9093 + faucet: 8084 + resources: + cpu: 1 + memory: 1Gi + - id: cosmoshublocal + name: cosmoshub + numValidators: 1 + genesis: + app_state: + staking: + params: + unbonding_time: '2m' + interchain_accounts: + host_genesis_state: + params: + host_enabled: true + allow_messages: ['*'] + faucet: + enabled: true + type: starship + ports: + rest: 1314 + rpc: 26654 + grpc: 9092 + faucet: 8083 + resources: + cpu: 1 + memory: 1Gi + +relayers: + - name: osmosis-cosmoshub + type: go-relayer + replicas: 1 + chains: + - osmosislocal + - cosmoshublocal + - name: agoric-osmosis + type: go-relayer + replicas: 1 + chains: + - agoriclocal + - osmosislocal + - name: agoric-cosmoshub + type: go-relayer + replicas: 1 + chains: + - agoriclocal + - cosmoshublocal + +explorer: + enabled: false + +registry: + enabled: true + ports: + rest: 8081 diff --git a/multichain-testing/test/fast-usdc/fast-usdc.test.ts b/multichain-testing/test/fast-usdc/fast-usdc.test.ts index 587989ff82b..4d90ef8bb0b 100644 --- a/multichain-testing/test/fast-usdc/fast-usdc.test.ts +++ b/multichain-testing/test/fast-usdc/fast-usdc.test.ts @@ -23,6 +23,8 @@ import type { CurrentWalletRecord } from '@agoric/smart-wallet/src/smartWallet.j import type { QueryBalanceResponseSDKType } from '@agoric/cosmic-proto/cosmos/bank/v1beta1/query.js'; import type { USDCProposalShapes } from '@agoric/fast-usdc/src/pool-share-math.js'; +const RELAYER_TYPE = process.env.RELAYER_TYPE; + const log = makeTracer('MCFU'); const { keys, values, fromEntries } = Object; @@ -49,7 +51,7 @@ const LP_DEPOSIT_AMOUNT = 8_000n * 10n ** 6n; test.before(async t => { const { setupTestKeys, ...common } = await commonSetup(t, { - config: '../config.fusdc.yaml', + config: `../config.fusdc${RELAYER_TYPE ? '.' + RELAYER_TYPE : ''}.yaml`, }); const { chainInfo, diff --git a/multichain-testing/test/support.ts b/multichain-testing/test/support.ts index e9d468efddc..caec7f3e76f 100644 --- a/multichain-testing/test/support.ts +++ b/multichain-testing/test/support.ts @@ -70,7 +70,11 @@ const makeKeyring = async ( export const commonSetup = async ( t: ExecutionContext, - { config = '../config.yaml' } = {}, + { + env = process.env, + relayerType = env.RELAYER_TYPE, + config = `../config${relayerType ? '.' + relayerType : ''}.yaml`, + } = {}, ) => { let useChain: MultichainRegistry['useChain']; try {