-
Notifications
You must be signed in to change notification settings - Fork 1.7k
138 lines (135 loc) · 5.34 KB
/
on-demand-vrfv2plus-performance-test.yml
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
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
name: On Demand VRFV2 Plus Performance Test
on:
workflow_dispatch:
inputs:
network:
description: Network to run tests on
type: choice
options:
- "ETHEREUM_MAINNET"
- "SIMULATED"
- "SEPOLIA"
- "OPTIMISM_MAINNET"
- "OPTIMISM_GOERLI"
- "ARBITRUM_MAINNET"
- "ARBITRUM_GOERLI"
- "ARBITRUM_SEPOLIA"
- "BSC_MAINNET"
- "BSC_TESTNET"
- "POLYGON_MAINNET"
- "POLYGON_MUMBAI"
- "AVALANCHE_FUJI"
- "AVALANCHE_MAINNET"
- "NEXON_DEV"
fundingPrivateKey:
description: Private funding key (Skip for Simulated)
required: false
type: string
wsURL:
description: WS URL for the network (Skip for Simulated)
required: false
type: string
httpURL:
description: HTTP URL for the network (Skip for Simulated)
required: false
type: string
chainlinkImage:
description: Container image location for the Chainlink nodes
required: true
default: public.ecr.aws/chainlink/chainlink
chainlinkVersion:
description: Container image version for the Chainlink nodes
required: true
default: "2.6.0"
performanceTestType:
description: Performance Test Type of test to run
type: choice
options:
- "Soak"
- "Load"
- "Stress"
- "Spike"
testDuration:
description: Duration of the test (time string)
required: true
default: 5m
useExistingEnv:
description: Set `true` to use existing environment or `false` to deploy CL node and all contracts
required: false
default: "false"
configBase64:
description: TOML config in base64 (Needed when overriding config or providing contract addresses for existing env)
required: false
jobs:
vrfv2plus_performance_test:
name: ${{ inputs.network }} VRFV2 Plus Performance Test
environment: integration
runs-on: ubuntu20.04-8cores-32GB
permissions:
checks: write
pull-requests: write
id-token: write
contents: read
env:
LOKI_URL: ${{ secrets.LOKI_URL }}
LOKI_TENANT_ID: ${{ secrets.LOKI_TENANT_ID }}
LOKI_BASIC_AUTH: ${{ secrets.LOKI_BASIC_AUTH }}
SELECTED_NETWORKS: ${{ inputs.network }}
TEST_TYPE: ${{ inputs.performanceTestType }}
VRFV2PLUS_TEST_DURATION: ${{ inputs.testDuration }}
VRFV2PLUS_USE_EXISTING_ENV: ${{ inputs.useExistingEnv }}
CONFIG: ${{ inputs.configBase64 }}
TEST_LOG_LEVEL: debug
REF_NAME: ${{ github.head_ref || github.ref_name }}
CHAINLINK_IMAGE: ${{ inputs.chainlinkImage }}
CHAINLINK_VERSION: ${{ inputs.chainlinkVersion }}
SLACK_API_KEY: ${{ secrets.QA_SLACK_API_KEY }}
SLACK_CHANNEL: ${{ secrets.QA_VRF_SLACK_CHANNEL }}
WASP_LOG_LEVEL: info
steps:
- name: Collect Metrics
id: collect-gha-metrics
uses: smartcontractkit/push-gha-metrics-action@d1618b772a97fd87e6505de97b872ee0b1f1729a # v2.0.2
with:
basic-auth: ${{ secrets.GRAFANA_CLOUD_BASIC_AUTH }}
hostname: ${{ secrets.GRAFANA_CLOUD_HOST }}
this-job-name: ${{ inputs.network }} VRFV2 Plus Performance Test
continue-on-error: true
- name: Setup Push Tag
shell: bash
run: |
echo "### chainlink image used for this test run :link:" >>$GITHUB_STEP_SUMMARY
echo "\`${{ inputs.chainlinkVersion }}\`" >>$GITHUB_STEP_SUMMARY
echo "### chainlink-tests image tag for this test run :ship:" >>$GITHUB_STEP_SUMMARY
echo "\`${GITHUB_SHA}\`" >>$GITHUB_STEP_SUMMARY
- name: Get Inputs
run: |
EVM_URLS=$(jq -r '.inputs.wsURL' $GITHUB_EVENT_PATH)
EVM_HTTP_URLS=$(jq -r '.inputs.httpURL' $GITHUB_EVENT_PATH)
EVM_KEYS=$(jq -r '.inputs.fundingPrivateKey' $GITHUB_EVENT_PATH)
echo ::add-mask::$EVM_URLS
echo ::add-mask::$EVM_HTTP_URLS
echo ::add-mask::$EVM_KEYS
echo EVM_URLS=$EVM_URLS >> $GITHUB_ENV
echo EVM_HTTP_URLS=$EVM_HTTP_URLS >> $GITHUB_ENV
echo EVM_KEYS=$EVM_KEYS >> $GITHUB_ENV
- name: Checkout code
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
with:
fetch-depth: 0
- name: Run Tests
uses: smartcontractkit/chainlink-github-actions/chainlink-testing-framework/run-tests@e865e376b8c2d594028c8d645dd6c47169b72974 # v2.2.16
with:
test_command_to_run: cd ./integration-tests && go test -v -count=1 -timeout 24h -run TestVRFV2PlusPerformance/vrfv2plus_performance_test ./load/vrfv2plus
test_download_vendor_packages_command: cd ./integration-tests && go mod download
cl_repo: ${{ inputs.chainlinkImage }}
cl_image_tag: ${{ inputs.chainlinkVersion }}
aws_registries: ${{ secrets.QA_AWS_ACCOUNT_NUMBER }}
artifacts_name: vrf-test-logs
artifacts_location: ./integration-tests/load/vrfv2plus/logs/
token: ${{ secrets.GITHUB_TOKEN }}
go_mod_path: ./integration-tests/go.mod
should_cleanup: false
QA_AWS_REGION: ${{ secrets.QA_AWS_REGION }}
QA_AWS_ROLE_TO_ASSUME: ${{ secrets.QA_AWS_ROLE_TO_ASSUME }}
QA_KUBECONFIG: ${{ secrets.QA_KUBECONFIG }}