-
Notifications
You must be signed in to change notification settings - Fork 2
116 lines (107 loc) · 5.87 KB
/
Copy pathccip-load-command.yml
File metadata and controls
116 lines (107 loc) · 5.87 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
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
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
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
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
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 }}