Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
156 changes: 156 additions & 0 deletions .github/actions/ccip-load-test/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,156 @@
name: Run CCIP load test
description: >-
Shared setup and execution for CCIP WASP load tests against local devenv or
prod-testnet infrastructure.

inputs:
ccip_env:
description: "Target environment: devenv or prod-testnet"
required: false
default: prod-testnet
direction:
description: "Load test direction"
required: false
default: canton2evm
message_rate:
description: "CANTON_LOAD_MESSAGE_RATE"
required: false
default: "1/45s"
load_duration:
description: "CANTON_LOAD_DURATION"
required: false
default: "2m"
test_timeout:
description: "go test -timeout value"
required: false
default: "30m"
config_file:
description: "CCIP_CONFIG_FILE basename under ccip/devenv (prod-testnet only)"
required: false
default: env-prod-testnet.ci.toml
canton_path:
description: "Checkout path for chainlink-canton (`.` for PR root, `chainlink-canton` for nested devenv checkout)"
required: false
default: .
canton_ref:
description: "chainlink-canton git ref for devenv setup (empty = workflow SHA)"
required: false
default: ""
skip_exec_confirm:
description: "CANTON_LOAD_SKIP_EXEC_CONFIRM"
required: false
default: "false"
confirm_exec_timeout:
description: "CANTON_CONFIRM_EXEC_TIMEOUT"
required: false
default: "10m"
party_id:
description: "CANTON_PARTY_ID"
required: false
default: "u_d53a15c42af6::1220c250c23c55120f7c758bccc5cbc739629015ab921594e1c29656981f985bffa7"
grpc_url:
description: "CANTON_GRPC_URL"
required: false
default: "testnet.cv1.bcy-v.metalhosts.com:443"
CANTON_OKTA_AUTHORIZER_TESTNET:
description: "GitHub secret CANTON_OKTA_AUTHORIZER_TESTNET"
required: false
CANTON_OKTA_CLIENT_ID_TESTNET:
description: "GitHub secret CANTON_OKTA_CLIENT_ID_TESTNET"
required: false
CANTON_OKTA_CLIENT_SECRET_TESTNET:
description: "GitHub secret CANTON_OKTA_CLIENT_SECRET_TESTNET"
required: false
CCIP_PROD_TESTNET_PRIVATE_KEY:
description: "GitHub secret CCIP_PROD_TESTNET_PRIVATE_KEY"
required: false
ccv-iam-role:
description: "AWS IAM role for CCV ECR authentication (devenv only)"
required: false
jd-registry:
description: "JD private ECR registry ID (devenv only)"
required: false
jd-image:
description: "JD Docker image reference (devenv only)"
required: false

runs:
using: composite
steps:
- name: Setup CCIP devenv
if: inputs.ccip_env == 'devenv'
uses: ./.github/actions/setup-ccip-devenv
with:
canton-ref: ${{ inputs.canton_ref }}
canton-path: ${{ inputs.canton_path }}
ccv-iam-role: ${{ inputs.ccv-iam-role }}
jd-registry: ${{ inputs.jd-registry }}
jd-image: ${{ inputs.jd-image }}

- name: Install Go (prod-testnet)
if: inputs.ccip_env == 'prod-testnet'
uses: actions/setup-go@v6
with:
cache: true
go-version-file: ${{ inputs.canton_path }}/go.mod
cache-dependency-path: ${{ inputs.canton_path }}/go.sum

- name: Download Go dependencies (prod-testnet)
if: inputs.ccip_env == 'prod-testnet'
shell: bash
working-directory: ${{ inputs.canton_path }}
run: go mod download

- name: Run load tests (devenv)
if: inputs.ccip_env == 'devenv'
shell: bash
working-directory: ${{ inputs.canton_path }}/ccip/devenv/tests/load
env:
CANTON_LOAD_MESSAGE_RATE: ${{ inputs.message_rate }}
CANTON_LOAD_DURATION: ${{ inputs.load_duration }}
run: |
case "${{ inputs.direction }}" in
canton2evm) TEST_RUN='^TestCanton2EVM_Load$' ;;
evm2canton) TEST_RUN='^TestEVM2Canton_Load$' ;;
canton2evm-token) TEST_RUN='^TestCanton2EVM_TokenLoad$' ;;
evm2canton-token) TEST_RUN='^TestEVM2Canton_TokenLoad$' ;;
*) echo "unknown direction: ${{ inputs.direction }}" >&2; exit 1 ;;
esac
go test -timeout "${{ inputs.test_timeout }}" -v -count 1 -ccip-env=devenv -run "$TEST_RUN"

- name: Run load tests (prod-testnet)
if: inputs.ccip_env == 'prod-testnet'
shell: bash
working-directory: ${{ inputs.canton_path }}/ccip/devenv/tests/load
env:
CCIP_ENV: prod-testnet
CCIP_CONFIG_FILE: ${{ inputs.config_file }}
CANTON_AUTH_TYPE: clientCredentials
CANTON_AUTH_URL: ${{ inputs.CANTON_OKTA_AUTHORIZER_TESTNET }}
CANTON_CLIENT_ID: ${{ inputs.CANTON_OKTA_CLIENT_ID_TESTNET }}
CANTON_CLIENT_SECRET: ${{ inputs.CANTON_OKTA_CLIENT_SECRET_TESTNET }}
CANTON_PARTY_ID: ${{ inputs.party_id }}
CANTON_GRPC_URL: ${{ inputs.grpc_url }}
CANTON_LOAD_MESSAGE_RATE: ${{ inputs.message_rate }}
CANTON_LOAD_DURATION: ${{ inputs.load_duration }}
CANTON_CONFIRM_EXEC_TIMEOUT: ${{ inputs.confirm_exec_timeout }}
CANTON_LOAD_SKIP_EXEC_CONFIRM: ${{ inputs.skip_exec_confirm }}
PRIVATE_KEY: ${{ inputs.CCIP_PROD_TESTNET_PRIVATE_KEY }}
run: |
case "${{ inputs.direction }}" in
canton2evm) TEST_RUN='^TestCanton2EVM_Load$' ;;
evm2canton) TEST_RUN='^TestEVM2Canton_Load$' ;;
canton2evm-token) TEST_RUN='^TestCanton2EVM_TokenLoad$' ;;
evm2canton-token) TEST_RUN='^TestEVM2Canton_TokenLoad$' ;;
*) echo "unknown direction: ${{ inputs.direction }}" >&2; exit 1 ;;
esac
go test -timeout "${{ inputs.test_timeout }}" -v -count 1 -ccip-env=prod-testnet -run "$TEST_RUN"

- name: Upload devenv logs
if: always() && inputs.ccip_env == 'devenv'
uses: ./.github/actions/upload-ccip-devenv-logs
with:
canton-path: ${{ inputs.canton_path }}
test-package-dir: load
log-dump-suffix: ccip-load-tests
artifact-name: container-logs-ccip-load-tests
116 changes: 116 additions & 0 deletions .github/workflows/ccip-load-command.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,116 @@
name: CCIP Load (ChatOps)
on:
repository_dispatch:
types: [ccip-load-command]

concurrency:
group: ccip-load-pr-${{ github.event.client_payload.pull_request.number }}
cancel-in-progress: false

permissions: {}

jobs:
load:
name: CCIP load (ChatOps)
if: |
github.event.client_payload.slash_command.command == 'ccip-load' &&
github.event.client_payload.pull_request.head.repo.full_name == github.repository
permissions:
contents: read
id-token: write
pull-requests: write
runs-on: ubuntu-latest-8cores-32GB
timeout-minutes: 120
steps:
- name: Setup GitHub Token
id: setup-github-token
uses: smartcontractkit/.github/actions/setup-github-token@ef78fa97bf3c77de6563db1175422703e9e6674f # setup-github-token@0.2.1

Check warning on line 27 in .github/workflows/ccip-load-command.yml

View workflow job for this annotation

GitHub Actions / Validate Workflow Changes

1. Trusted actions should use a major version tag, if available. (trusted-tag-ref / warning)
with:
aws-role-arn: ${{ secrets.GATI_AWS_ROLE_CANTON_CICD }}
aws-lambda-url: ${{ secrets.GATI_AWS_LABDA_URL_INTEGRATIONS }}
aws-region: ${{ secrets.GATI_AWS_REGION }}

- name: Post comment
uses: mshick/add-pr-comment@b8f338c590a895d50bcbfa6c5859251edc8952fc # v2.8.2

Check warning on line 34 in .github/workflows/ccip-load-command.yml

View workflow job for this annotation

GitHub Actions / Validate Workflow Changes

1. Action is using node20. Versions older than node24 are being deprecated. Use a newer version of the action if possible. (node-version / warning)
with:
repo-token: ${{ steps.setup-github-token.outputs.access-token }}
refresh-message-position: true
issue: ${{ github.event.client_payload.github.payload.issue.number }}
message: |
CCIP load test running...
Workflow run: https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }}

- name: Check out PR branch
uses: actions/checkout@v6
with:
ref: ${{ github.event.client_payload.pull_request.head.sha }}
token: ${{ steps.setup-github-token.outputs.access-token }}

- name: Resolve inputs
Comment thread
github-advanced-security[bot] marked this conversation as resolved.
Fixed
id: params
env:
NAMED_CCIP_ENV: ${{ github.event.client_payload.slash_command.args.named.ccip_env }}
NAMED_DIRECTION: ${{ github.event.client_payload.slash_command.args.named.direction }}
NAMED_MESSAGE_RATE: ${{ github.event.client_payload.slash_command.args.named.message_rate }}
NAMED_LOAD_DURATION: ${{ github.event.client_payload.slash_command.args.named.load_duration }}
NAMED_TEST_TIMEOUT: ${{ github.event.client_payload.slash_command.args.named.test_timeout }}
NAMED_CONFIG_FILE: ${{ github.event.client_payload.slash_command.args.named.config_file }}
NAMED_SKIP_EXEC_CONFIRM: ${{ github.event.client_payload.slash_command.args.named.skip_exec_confirm }}
NAMED_CONFIRM_EXEC_TIMEOUT: ${{ github.event.client_payload.slash_command.args.named.confirm_exec_timeout }}
NAMED_PARTY_ID: ${{ github.event.client_payload.slash_command.args.named.party_id }}
NAMED_GRPC_URL: ${{ github.event.client_payload.slash_command.args.named.grpc_url }}
run: |
echo "ccip_env=${NAMED_CCIP_ENV:-prod-testnet}" >> "$GITHUB_OUTPUT"
echo "direction=${NAMED_DIRECTION:-canton2evm}" >> "$GITHUB_OUTPUT"
echo "message_rate=${NAMED_MESSAGE_RATE:-1/45s}" >> "$GITHUB_OUTPUT"
echo "load_duration=${NAMED_LOAD_DURATION:-2m}" >> "$GITHUB_OUTPUT"
echo "config_file=${NAMED_CONFIG_FILE:-env-prod-testnet.ci.toml}" >> "$GITHUB_OUTPUT"
echo "skip_exec_confirm=${NAMED_SKIP_EXEC_CONFIRM:-true}" >> "$GITHUB_OUTPUT"
echo "confirm_exec_timeout=${NAMED_CONFIRM_EXEC_TIMEOUT:-10m}" >> "$GITHUB_OUTPUT"
echo "party_id=${NAMED_PARTY_ID:-u_d53a15c42af6::1220c250c23c55120f7c758bccc5cbc739629015ab921594e1c29656981f985bffa7}" >> "$GITHUB_OUTPUT"
echo "grpc_url=${NAMED_GRPC_URL:-testnet.cv1.bcy-v.metalhosts.com:443}" >> "$GITHUB_OUTPUT"

direction="${NAMED_DIRECTION:-canton2evm}"
if [ -n "${NAMED_TEST_TIMEOUT}" ]; then
echo "test_timeout=${NAMED_TEST_TIMEOUT}" >> "$GITHUB_OUTPUT"
elif [ "$direction" = "evm2canton" ]; then
echo "test_timeout=45m" >> "$GITHUB_OUTPUT"
else
echo "test_timeout=30m" >> "$GITHUB_OUTPUT"
fi

- name: Run CCIP load test
uses: ./.github/actions/ccip-load-test
with:
ccip_env: ${{ steps.params.outputs.ccip_env }}
direction: ${{ steps.params.outputs.direction }}
message_rate: ${{ steps.params.outputs.message_rate }}
load_duration: ${{ steps.params.outputs.load_duration }}
test_timeout: ${{ steps.params.outputs.test_timeout }}
config_file: ${{ steps.params.outputs.config_file }}
canton_path: .
skip_exec_confirm: ${{ steps.params.outputs.skip_exec_confirm }}
confirm_exec_timeout: ${{ steps.params.outputs.confirm_exec_timeout }}
party_id: ${{ steps.params.outputs.party_id }}
grpc_url: ${{ steps.params.outputs.grpc_url }}
CANTON_OKTA_AUTHORIZER_TESTNET: ${{ secrets.CANTON_OKTA_AUTHORIZER_TESTNET }}
CANTON_OKTA_CLIENT_ID_TESTNET: ${{ secrets.CANTON_OKTA_CLIENT_ID_TESTNET }}
CANTON_OKTA_CLIENT_SECRET_TESTNET: ${{ secrets.CANTON_OKTA_CLIENT_SECRET_TESTNET }}
CCIP_PROD_TESTNET_PRIVATE_KEY: ${{ secrets.CCIP_PROD_TESTNET_PRIVATE_KEY }}

- name: Update comment
if: always()
uses: mshick/add-pr-comment@b8f338c590a895d50bcbfa6c5859251edc8952fc # v2.8.2

Check warning on line 103 in .github/workflows/ccip-load-command.yml

View workflow job for this annotation

GitHub Actions / Validate Workflow Changes

1. Action is using node20. Versions older than node24 are being deprecated. Use a newer version of the action if possible. (node-version / warning)
with:
repo-token: ${{ steps.setup-github-token.outputs.access-token }}
refresh-message-position: true
issue: ${{ github.event.client_payload.github.payload.issue.number }}
message-success: |
CCIP load test passed.
Workflow run: https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }}
message-failure: |
CCIP load test failed.
Workflow run: https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }}
message-cancelled: |
CCIP load test cancelled.
Workflow run: https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }}
Loading
Loading