-
Notifications
You must be signed in to change notification settings - Fork 231
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
d69ad05
commit b51b4a5
Showing
4 changed files
with
140 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,121 @@ | ||
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:main" 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 | ||
# Build validator pod names (chainid-genesis-0) | ||
VALIDATOR_PODS=$(yq e '.chains[] | .id + "-genesis-0"' ./agoric-sdk/multichain-testing/${{ inputs.config }} | tr '\n' ' ') | ||
echo "VALIDATOR_PODS=${VALIDATOR_PODS}" >> $GITHUB_ENV | ||
# Build relayer pod names (type-name-0) | ||
RELAYER_PODS=$(yq e '.relayers[] | .type + "-" + .name + "-0"' ./agoric-sdk/multichain-testing/${{ inputs.config }} | tr '\n' ' ') | ||
echo "RELAYER_PODS=${RELAYER_PODS}" >> $GITHUB_ENV | ||
# For debugging | ||
echo "Namespace: ${NAMESPACE}" | ||
echo "Validator pods: ${VALIDATOR_PODS}" | ||
echo "Relayer pods: ${RELAYER_PODS}" | ||
- 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/starship-action@0.3.0 | ||
with: | ||
values: ./agoric-sdk/multichain-testing/${{ inputs.config }} | ||
port-forward: true | ||
version: 0.2.20 | ||
timeout: 30m | ||
namespace: ${{ env.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 }} | ||
|
||
- name: Capture validator logs | ||
if: always() | ||
run: | | ||
for pod in ${VALIDATOR_PODS}; do | ||
echo "Capturing validator logs for ${pod}" | ||
kubectl logs ${pod} --container=validator > ./agoric-sdk/multichain-testing/logs/${pod}.log 2>&1 || true | ||
done | ||
working-directory: ./agoric-sdk | ||
|
||
- name: Capture relayer logs | ||
if: always() | ||
run: | | ||
for pod in ${RELAYER_PODS}; do | ||
echo "Capturing relayer logs for ${pod}" | ||
kubectl logs ${pod} --container=relayer > ./agoric-sdk/multichain-testing/logs/${pod}.log 2>&1 || true | ||
done | ||
working-directory: ./agoric-sdk | ||
|
||
- 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
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 |
---|---|---|
@@ -1,3 +1,6 @@ | ||
name: agoric-multichain-testing-fusdc | ||
version: 0.2.20 | ||
|
||
chains: | ||
- id: agoriclocal | ||
name: agoric | ||
|
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 |
---|---|---|
@@ -1,3 +1,6 @@ | ||
name: agoric-multichain-testing | ||
version: 0.2.20 | ||
|
||
chains: | ||
- id: agoriclocal | ||
name: agoric | ||
|