-
Notifications
You must be signed in to change notification settings - Fork 1.7k
143 lines (140 loc) · 5.66 KB
/
on-demand-ocr-soak-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
139
140
141
142
143
name: On Demand OCR Soak Test
on:
workflow_dispatch:
inputs:
network:
description: Network to run tests on
type: choice
options:
- "SIMULATED"
- "GOERLI"
- "OPTIMISM_GOERLI"
- "ARBITRUM_GOERLI"
- "CELO_ALFAJORES"
- "CELO_MAINNET"
- "BASE_GOERLI"
- "BASE_MAINNET"
- "BSC_MAINNET"
- "BSC_TESTNET"
- "SCROLL_SEPOLIA"
- "SCROLL_MAINNET"
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
slackMemberID:
description: Slack Member ID (Not your @)
required: true
default: U01A2B2C3D4
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: "1.11.0"
testDuration:
description: Duration of the test (time string)
required: false
default: 15m
chainlinkNodeFunding:
description: How much to fund each Chainlink node (in ETH)
required: false
default: ".001"
timeBetweenRounds:
description: How long to wait before starting a new round
required: false
default: 1m
jobs:
ocr_soak_test:
name: ${{ inputs.network }} OCR Soak Test
environment: integration
runs-on: ubuntu-latest
permissions:
checks: write
pull-requests: write
id-token: write
contents: read
env:
CHAINLINK_COMMIT_SHA: ${{ inputs.chainlinkVersion }}
CHAINLINK_ENV_USER: ${{ github.actor }}
SELECTED_NETWORKS: ${{ inputs.network }}
SLACK_API_KEY: ${{ secrets.QA_SLACK_API_KEY }}
SLACK_CHANNEL: ${{ secrets.QA_SLACK_CHANNEL }}
OCR_TEST_DURATION: ${{ inputs.testDuration }}
OCR_CHAINLINK_NODE_FUNDING: ${{ inputs.chainlinkNodeFunding }}
OCR_TIME_BETWEEN_ROUNDS: ${{ inputs.timeBetweenRounds }}
TEST_LOG_LEVEL: debug
REF_NAME: ${{ github.head_ref || github.ref_name }}
ENV_JOB_IMAGE_BASE: ${{ secrets.QA_AWS_ACCOUNT_NUMBER }}.dkr.ecr.${{ secrets.QA_AWS_REGION }}.amazonaws.com/chainlink-tests
steps:
- name: Collect Metrics
id: collect-gha-metrics
uses: smartcontractkit/push-gha-metrics-action@d2c2b7bdc9012651230b2608a1bcb0c48538b6ec
with:
basic-auth: ${{ secrets.GRAFANA_CLOUD_BASIC_AUTH }}
hostname: ${{ secrets.GRAFANA_CLOUD_HOST }}
this-job-name: ${{ inputs.network }} OCR Soak Test
continue-on-error: true
- 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)
SLACK_USER=$(jq -r '.inputs.slackMemberID' $GITHUB_EVENT_PATH)
echo ::add-mask::$EVM_URLS
echo ::add-mask::$EVM_HTTP_URLS
echo ::add-mask::$EVM_KEYS
echo ::add-mask::$SLACK_USER
echo EVM_URLS=$EVM_URLS >> $GITHUB_ENV
echo EVM_HTTP_URLS=$EVM_HTTP_URLS >> $GITHUB_ENV
echo EVM_KEYS=$EVM_KEYS >> $GITHUB_ENV
echo SLACK_USER=$SLACK_USER >> $GITHUB_ENV
- name: Checkout the repo
uses: actions/checkout@f43a0e5ff2bd294095638e18286ca9a3d1956744 # v3.6.0
with:
ref: ${{ env.REF_NAME }}
- 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: Build Image
uses: ./.github/actions/build-test-image
with:
QA_AWS_ROLE_TO_ASSUME: ${{ secrets.QA_AWS_ROLE_TO_ASSUME }}
QA_AWS_REGION: ${{ secrets.QA_AWS_REGION }}
QA_AWS_ACCOUNT_NUMBER: ${{ secrets.QA_AWS_ACCOUNT_NUMBER }}
- name: Run Tests
uses: smartcontractkit/chainlink-github-actions/chainlink-testing-framework/run-tests@eccde1970eca69f079d3efb3409938a72ade8497 # v2.2.13
env:
DETACH_RUNNER: true
TEST_SUITE: soak
TEST_ARGS: -test.timeout 900h -test.memprofile memprofile.out -test.cpuprofile profile.out
ENV_JOB_IMAGE: ${{ secrets.QA_AWS_ACCOUNT_NUMBER }}.dkr.ecr.${{ secrets.QA_AWS_REGION }}.amazonaws.com/chainlink-tests:${{ github.sha }}
# We can comment these out when we have a stable soak test and aren't worried about resource consumption
TEST_UPLOAD_CPU_PROFILE: true
TEST_UPLOAD_MEM_PROFILE: true
with:
test_command_to_run: cd ./integration-tests && go test -v -count=1 -run ^TestOCRSoak$ ./soak
test_download_vendor_packages_command: make gomod
cl_repo: ${{ inputs.chainlinkImage }}
cl_image_tag: ${{ inputs.chainlinkVersion }}
token: ${{ secrets.GITHUB_TOKEN }}
should_cleanup: false
go_mod_path: ./integration-tests/go.mod
QA_AWS_REGION: ${{ secrets.QA_AWS_REGION }}
QA_AWS_ROLE_TO_ASSUME: ${{ secrets.QA_AWS_ROLE_TO_ASSUME }}
QA_KUBECONFIG: ${{ secrets.QA_KUBECONFIG }}