-
Notifications
You must be signed in to change notification settings - Fork 1.6k
132 lines (114 loc) · 4.03 KB
/
integration-staging-tests.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
# NEEDS ADJUSTING TO TOML CONFIG BEFORE USING!!
name: E2E Functions staging tests
on:
# TODO: enable when env will be stable
# schedule:
# - cron: "0 0 * * *"
workflow_dispatch:
inputs:
network:
description: Blockchain network (testnet)
type: choice
default: "MUMBAI"
options:
- "MUMBAI"
test_type:
description: Test type
type: choice
default: "mumbai_functions_soak_test_real"
options:
- "mumbai_functions_soak_test_http"
- "mumbai_functions_stress_test_http"
- "mumbai_functions_soak_test_only_secrets"
- "mumbai_functions_stress_test_only_secrets"
- "mumbai_functions_soak_test_real"
- "mumbai_functions_stress_test_real"
# TODO: disabled, need GATI access
# - "gateway_secrets_set_soak_test"
# - "gateway_secrets_list_soak_test"
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
e2e-soak-test:
environment: sdlc
runs-on: ubuntu22.04-8cores-32GB
permissions:
contents: read
id-token: write
env:
LOKI_URL: ${{ secrets.LOKI_URL }}
LOKI_TOKEN: ${{ secrets.LOKI_TOKEN }}
SELECTED_NETWORKS: ${{ inputs.network }}
SELECTED_TEST: ${{ inputs.test_type }}
MUMBAI_URLS: ${{ secrets.FUNCTIONS_STAGING_MUMBAI_URLS }}
MUMBAI_KEYS: ${{ secrets.FUNCTIONS_STAGING_MUMBAI_KEYS }}
WASP_LOG_LEVEL: info
steps:
- name: Checkout code
uses: actions/checkout@9bb56186c3b09b4f86b1c65136769dd318469633 # v4.1.2
with:
fetch-depth: 0
- name: Prepare Base64 TOML override
env:
PYROSCOPE_SERVER: ${{ secrets.QA_PYROSCOPE_INSTANCE }}
PYROSCOPE_ENVIRONMENT: ci-smoke-${{ matrix.product }}-sepolia
PYROSCOPE_KEY: ${{ secrets.QA_PYROSCOPE_KEY }}
run: |
convert_to_toml_array() {
local IFS=','
local input_array=($1)
local toml_array_format="["
for element in "${input_array[@]}"; do
toml_array_format+="\"$element\","
done
toml_array_format="${toml_array_format%,}]"
echo "$toml_array_format"
}
if [ -n "$PYROSCOPE_SERVER" ]; then
pyroscope_enabled=true
else
pyroscope_enabled=false
fi
cat << EOF > config.toml
[Common]
chainlink_node_funding=0.5
[ChainlinkImage]
image="$CHAINLINK_IMAGE"
version="${{ github.sha }}"
[Pyroscope]
enabled=$pyroscope_enabled
server_url="$PYROSCOPE_SERVER"
environment="$PYROSCOPE_ENVIRONMENT"
key_secret="$PYROSCOPE_KEY"
[Logging]
run_id="$RUN_ID"
[Logging.LogStream]
log_targets=$log_targets
[Logging.Loki]
tenant_id="$LOKI_TENANT_ID"
endpoint="$LOKI_URL"
basic_auth_secret="$LOKI_BASIC_AUTH"
[Logging.Grafana]
base_url="$GRAFANA_URL"
dashboard_url="/d/ddf75041-1e39-42af-aa46-361fe4c36e9e/ci-e2e-tests-logs"
[Network]
selected_networks=["sepolia"]
[Network.RpcHttpUrls]
sepolia = $(convert_to_toml_array "$SEPOLIA_HTTP_URLS")
[Network.RpcWsUrls]
sepolia = $(convert_to_toml_array "$SEPOLIA_URLS")
[Network.WalletKeys]
sepolia = $(convert_to_toml_array "$EVM_KEYS")
EOF
BASE64_CONFIG_OVERRIDE=$(cat config.toml | base64 -w 0)
echo ::add-mask::$BASE64_CONFIG_OVERRIDE
echo "BASE64_CONFIG_OVERRIDE=$BASE64_CONFIG_OVERRIDE" >> $GITHUB_ENV
- name: Run E2E soak tests
run: |
cd integration-tests/load/functions
if [[ $SELECTED_TEST == mumbai_functions* ]]; then
go test -v -timeout 6h -run TestFunctionsLoad/$SELECTED_TEST
elif [[ $SELECTED_TEST == gateway* ]]; then
go test -v -timeout 6h -run TestGatewayLoad/$SELECTED_TEST
fi