On Demand VRFV2 Performance Test #110
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: On Demand VRFV2 Performance Test | |
on: | |
workflow_dispatch: | |
inputs: | |
base64Config: | |
description: base64-ed config | |
required: true | |
type: string | |
performanceTestType: | |
description: Performance Test Type of test to run | |
type: choice | |
options: | |
- "Soak" | |
- "Load" | |
- "Stress" | |
- "Spike" | |
jobs: | |
vrfv2_performance_test: | |
name: VRFV2 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 }} | |
TEST_TYPE: ${{ inputs.performanceTestType }} | |
TEST_LOG_LEVEL: debug | |
REF_NAME: ${{ github.head_ref || github.ref_name }} | |
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 Performance Test | |
continue-on-error: true | |
- name: Add masks and export base64 config | |
run: | | |
BASE64_CONFIG_OVERRIDE=$(jq -r '.inputs.base64Config' $GITHUB_EVENT_PATH) | |
echo ::add-mask::$BASE64_CONFIG_OVERRIDE | |
echo "BASE64_CONFIG_OVERRIDE=$BASE64_CONFIG_OVERRIDE" >> $GITHUB_ENV | |
decoded_toml=$(echo $BASE64_CONFIG_OVERRIDE | base64 -d) | |
CHAINLINK_IMAGE=$(echo "$decoded_toml" | awk -F'=' '/^[[:space:]]*image[[:space:]]*=/ {gsub(/^[[:space:]]+|[[:space:]]+$/, "", $2); print $2}' 2>/dev/null) | |
# echo ::add-mask::$CHAINLINK_IMAGE | |
CHAINLINK_VERSION=$(echo "$decoded_toml" | awk -F'=' '/^[[:space:]]*version[[:space:]]*=/ {gsub(/^[[:space:]]+|[[:space:]]+$/, "", $2); print $2}' 2>/dev/null) | |
NETWORKS=$(echo "$decoded_toml" | awk -F'=' '/^[[:space:]]*selected_networks[[:space:]]*=/ {gsub(/^[[:space:]]+|[[:space:]]+$/, "", $2); print $2}' 2>/dev/null) | |
if [ -n "$CHAINLINK_IMAGE" ]; then | |
echo "CHAINLINK_IMAGE=$CHAINLINK_IMAGE" >> $GITHUB_ENV | |
else | |
echo "No Chainlink Image found in base64-ed config. Exiting" | |
exit 1 | |
fi | |
if [ -n "$CHAINLINK_VERSION" ]; then | |
echo "CHAINLINK_VERSION=$CHAINLINK_VERSION" >> $GITHUB_ENV | |
else | |
echo "No Chainlink Version found in base64-ed config. Exiting" | |
exit 1 | |
fi | |
if [ -n "$NETWORKS" ]; then | |
echo "NETWORKS=$NETWORKS" >> $GITHUB_ENV | |
fi | |
# use Loki config from GH secrets and merge it with base64 input | |
cat << EOF > config.toml | |
[Logging.Loki] | |
tenant_id="$LOKI_TENANT_ID" | |
url="some_url" | |
basic_auth="some_value" | |
EOF | |
echo "$decoded_toml" >> final_config.toml | |
cat config.toml >> final_config.toml | |
BASE64_CONFIG_OVERRIDE=$(cat final_config.toml | base64 -w 0) | |
# echo ::add-mask::$BASE64_CONFIG_OVERRIDE | |
echo "BASE64_CONFIG_OVERRIDE=$BASE64_CONFIG_OVERRIDE" >> $GITHUB_ENV | |
- name: Send details to Step Summary | |
shell: bash | |
run: | | |
echo "### chainlink image used for this test run :link:" >>$GITHUB_STEP_SUMMARY | |
echo "\`${{ env.CHAINLINK_IMAGE }}\`" >>$GITHUB_STEP_SUMMARY | |
echo "### chainlink-tests image tag for this test run :ship:" >>$GITHUB_STEP_SUMMARY | |
echo "\`${GITHUB_SHA}\`" >>$GITHUB_STEP_SUMMARY | |
echo "### Networks on which test was run" >>$GITHUB_STEP_SUMMARY | |
echo "\`${{ env.NETWORKS }}\`" >>$GITHUB_STEP_SUMMARY | |
- 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@7d541cbbca52d45b8a718257af86d9cf49774d1f # v2.2.15 | |
# with: | |
# test_command_to_run: cd ./integration-tests && go test -v -count=1 -timeout 24h -run TestVRFV2Performance/vrfv2_performance_test ./load/vrfv2 | |
# test_download_vendor_packages_command: cd ./integration-tests && go mod download | |
# cl_repo: ${{ env.CHAINLINK_IMAGE }} | |
# cl_image_tag: ${{ env.CHAINLINK_VERSION }} | |
# aws_registries: ${{ secrets.QA_AWS_ACCOUNT_NUMBER }} | |
# artifacts_name: vrf-test-logs | |
# artifacts_location: ./integration-tests/load/vrfv2/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 }} |