-
Notifications
You must be signed in to change notification settings - Fork 232
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
ci(multichain-testing): yarn test:fast-usdc
- Loading branch information
1 parent
857050c
commit a4ee6a6
Showing
2 changed files
with
139 additions
and
78 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,126 @@ | ||
name: Multichain E2E Workflow Template | ||
|
||
on: | ||
workflow_call: | ||
inputs: | ||
config: | ||
required: true | ||
type: string | ||
test_command: | ||
required: true | ||
type: string | ||
description: 'Test command to run (e.g., "test" or "test:fast-usdc")' | ||
|
||
jobs: | ||
multichain-e2e: | ||
runs-on: ubuntu-latest-16core | ||
|
||
steps: | ||
- uses: actions/checkout@v4 | ||
with: | ||
submodules: 'true' | ||
path: ./agoric-sdk | ||
|
||
- uses: ./agoric-sdk/.github/actions/restore-node | ||
with: | ||
node-version: 18.x | ||
path: ./agoric-sdk | ||
|
||
# Extract chain and relayer information | ||
- name: Extract config information | ||
id: extract-config | ||
run: | | ||
# Create logs directory | ||
mkdir -p ./agoric-sdk/multichain-testing/logs | ||
# Extract namespace name | ||
NAMESPACE=$(yq e '.name' ./agoric-sdk/multichain-testing/${{ inputs.config }}) | ||
echo "NAMESPACE=${NAMESPACE}" >> $GITHUB_ENV | ||
# Extract chain IDs | ||
CHAIN_IDS=$(yq e '.chains[].id' ./agoric-sdk/multichain-testing/${{ inputs.config }} | tr '\n' ' ') | ||
echo "CHAIN_IDS=${CHAIN_IDS}" >> $GITHUB_ENV | ||
# Extract relayer information (name and type) | ||
RELAYER_INFO=$(yq e '.relayers[] | .name + ":" + .type' ./agoric-sdk/multichain-testing/${{ inputs.config }} | tr '\n' ' ') | ||
echo "RELAYER_INFO=${RELAYER_INFO}" >> $GITHUB_ENV | ||
# For debugging | ||
echo "Namespace: ${NAMESPACE}" | ||
echo "Chains: ${CHAIN_IDS}" | ||
echo "Relayer Info: ${RELAYER_INFO}" | ||
- name: yarn link | ||
run: | | ||
yarn link-cli ~/bin/agoric | ||
echo "/home/runner/bin" >> $GITHUB_PATH | ||
working-directory: ./agoric-sdk | ||
|
||
- name: Enable Corepack | ||
run: corepack enable | ||
working-directory: ./agoric-sdk/multichain-testing | ||
|
||
- name: Install @agoric/multichain-testing deps | ||
run: yarn install | ||
working-directory: ./agoric-sdk/multichain-testing | ||
|
||
- name: Lint @agoric/multichain-testing | ||
run: yarn lint | ||
working-directory: ./agoric-sdk/multichain-testing | ||
|
||
- name: Setup Starship Infrastructure | ||
id: starship-infra | ||
uses: cosmology-tech/[email protected] | ||
with: | ||
values: ./agoric-sdk/multichain-testing/${{ inputs.config }} | ||
port-forward: true | ||
version: 0.2.20 | ||
timeout: 30m | ||
namespace: ${NAMESPACE} | ||
|
||
- name: Fund Provision Pool | ||
run: | | ||
kubectl config set-context --current --namespace=${NAMESPACE} | ||
kubectl get pods | ||
make fund-provision-pool | ||
working-directory: ./agoric-sdk/multichain-testing | ||
|
||
- name: Override Chain Registry | ||
run: make override-chain-registry | ||
working-directory: ./agoric-sdk/multichain-testing | ||
|
||
- name: Run @agoric/multichain-testing E2E Tests | ||
run: yarn ${{ inputs.test_command }} | ||
working-directory: ./agoric-sdk/multichain-testing | ||
env: | ||
FILE: ${{ inputs.config }} | ||
|
||
# Capture all validator logs | ||
- name: Capture validator logs | ||
if: always() | ||
run: | | ||
for chain in ${CHAIN_IDS}; do | ||
echo "Capturing validator logs for ${chain}" | ||
kubectl logs ${chain}-genesis-0 --container=validator > ./agoric-sdk/multichain-testing/logs/${chain}-validator.log 2>&1 || true | ||
done | ||
working-directory: ./agoric-sdk | ||
|
||
# Capture all relayer logs | ||
- name: Capture relayer logs | ||
if: always() | ||
run: | | ||
for relayer_info in ${RELAYER_INFO}; do | ||
name=$(echo $relayer_info | cut -d':' -f1) | ||
type=$(echo $relayer_info | cut -d':' -f2) | ||
echo "Capturing relayer logs for ${type}-${name}" | ||
kubectl logs ${type}-${name}-0 --container=relayer > ./agoric-sdk/multichain-testing/logs/${type}-${name}-relayer.log 2>&1 || true | ||
done | ||
working-directory: ./agoric-sdk | ||
|
||
# Upload all logs as artifacts | ||
- name: Upload test logs | ||
if: always() | ||
uses: actions/upload-artifact@v4 | ||
with: | ||
name: multichain-e2e-logs-${NAMESPACE} | ||
path: ./agoric-sdk/multichain-testing/logs/ |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5,81 +5,16 @@ on: | |
workflow_call: | ||
|
||
jobs: | ||
multichain-e2e: | ||
runs-on: ubuntu-latest-16core | ||
|
||
steps: | ||
- uses: actions/checkout@v4 | ||
with: | ||
submodules: 'true' | ||
path: ./agoric-sdk | ||
- uses: ./agoric-sdk/.github/actions/restore-node | ||
with: | ||
node-version: 18.x | ||
path: ./agoric-sdk | ||
|
||
- name: yarn link | ||
run: | | ||
yarn link-cli ~/bin/agoric | ||
echo "/home/runner/bin" >> $GITHUB_PATH | ||
working-directory: ./agoric-sdk | ||
|
||
- name: Enable Corepack | ||
run: corepack enable | ||
working-directory: ./agoric-sdk/multichain-testing | ||
|
||
- name: Install @agoric/multichain-testing deps | ||
run: yarn install | ||
working-directory: ./agoric-sdk/multichain-testing | ||
|
||
- name: Lint @agoric/multichain-testing | ||
run: yarn lint | ||
working-directory: ./agoric-sdk/multichain-testing | ||
|
||
- name: Setup Starship Infrastructure | ||
id: starship-infra | ||
uses: cosmology-tech/[email protected] | ||
with: | ||
# uses ghcr.io/agoric/agoric-sdk:dev image (latest master) | ||
values: ./agoric-sdk/multichain-testing/config.yaml | ||
port-forward: true | ||
version: 0.2.20 | ||
timeout: 30m | ||
namespace: agoric-multichain | ||
|
||
- name: Fund Provision Pool | ||
run: | | ||
kubectl config set-context --current --namespace=agoric-multichain | ||
kubectl get pods | ||
make fund-provision-pool | ||
working-directory: ./agoric-sdk/multichain-testing | ||
|
||
- name: Ensure ports are forwarded | ||
run: | | ||
curl --fail --retry 3 --retry-delay 10 http://localhost:26657/status || (echo "agoriclocal node is available") | ||
curl --fail --retry 3 --retry-delay 10 http://localhost:8081/chains/agoriclocal || (echo "agoriclocal URL check failed") | ||
curl --fail --retry 3 --retry-delay 10 http://localhost:8081/chains/osmosislocal || (echo "osmosislocal URL check failed") | ||
curl --fail --retry 3 --retry-delay 10 http://localhost:8081/chains/gaialocal || (echo "gaialocal URL check failed") | ||
- name: Override Chain Registry | ||
run: make override-chain-registry | ||
working-directory: ./agoric-sdk/multichain-testing | ||
|
||
- name: Run @agoric/multichain-testing E2E Tests | ||
run: yarn test | ||
working-directory: ./agoric-sdk/multichain-testing | ||
|
||
- name: Capture and print agoric validator logs | ||
if: always() | ||
run: kubectl logs agoriclocal-genesis-0 --container=validator || true | ||
working-directory: ./agoric-sdk/multichain-testing | ||
|
||
- name: Capture and print agoric-osmosis relayer logs | ||
if: always() | ||
run: kubectl logs hermes-agoric-osmosis-0 --container=relayer || true | ||
working-directory: ./agoric-sdk/multichain-testing | ||
|
||
- name: Capture and print agoric-cosmos relayer logs | ||
if: always() | ||
run: kubectl logs hermes-agoric-gaia-0 --container=relayer || true | ||
working-directory: ./agoric-sdk/multichain-testing | ||
orchestration-api-test: | ||
name: Multichain E2E (Orchestration API) | ||
uses: ./.github/workflows/multichain-e2e-template.yml | ||
with: | ||
config: config.yaml | ||
test_command: test | ||
|
||
fast-usdc-test: | ||
name: Multichain E2E (Fast USDC) | ||
uses: ./.github/workflows/multichain-e2e-template.yml | ||
with: | ||
config: config.fusdc.yaml | ||
test_command: test:fast-usdc |