Skip to content

On Demand OCR Soak Test #363

On Demand OCR Soak Test

On Demand OCR Soak Test #363

name: On Demand OCR Soak Test
on:
workflow_dispatch:
inputs:
base64Config:
description: base64-ed config
required: true
type: string
slackMemberID:
description: Slack Member ID (Not your @)
required: true
default: U01A2B2C3D4
type: string
jobs:
ocr_soak_test:
name: OCR Soak Test
environment: integration
runs-on: ubuntu-latest
permissions:
checks: write
pull-requests: write
id-token: write
contents: read
env:
CHAINLINK_ENV_USER: ${{ github.actor }}
SLACK_API_KEY: ${{ secrets.QA_SLACK_API_KEY }}
SLACK_CHANNEL: ${{ secrets.QA_SLACK_CHANNEL }}
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@0281b09807758be1dcc41651e44e62b353808c47 # v2.1.0
with:
org-id: ${{ secrets.GRAFANA_INTERNAL_TENANT_ID }}
basic-auth: ${{ secrets.GRAFANA_INTERNAL_BASIC_AUTH }}
hostname: ${{ secrets.GRAFANA_INTERNAL_HOST }}
this-job-name: ${{ inputs.network }} OCR Soak Test
continue-on-error: true
- name: Checkout the repo
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
with:
ref: ${{ env.REF_NAME }}
- name: Get Slack config and mask base64 config
run: |
SLACK_USER=$(jq -r '.inputs.slackMemberID' $GITHUB_EVENT_PATH)
echo ::add-mask::$SLACK_USER
echo SLACK_USER=$SLACK_USER >> $GITHUB_ENV
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
- name: Parse base64 config
uses: ./.github/actions/setup-parse-base64-config
with:
base64Config: ${{ env.BASE64_CONFIG_OVERRIDE }}
- name: Setup Push Tag
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: 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@92e0f299a87522c2a37bfc4686c4d8a96dc9d28b # v2.3.5
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: ${{ env.CHAINLINK_IMAGE }}
cl_image_tag: ${{ env.CHAINLINK_VERSION }}
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 }}