Skip to content

Commit

Permalink
Update some test workflows to run with test config path
Browse files Browse the repository at this point in the history
  • Loading branch information
lukaszcl committed Sep 2, 2024
1 parent 4d5fc19 commit c0885b4
Show file tree
Hide file tree
Showing 2 changed files with 33 additions and 49 deletions.
44 changes: 16 additions & 28 deletions .github/workflows/automation-benchmark-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,20 +7,20 @@ on:
required: true
default: benchmark
type: string
base64Config:
description: base64-ed config
required: true
type: string
test_config_override_path:
description: Path to a test config file used to override the default test config
required: false
type: string
test_secrets_override_key:
description: Key to run tests with custom test secrets
required: false
type: string
slackMemberID:
description: Notifies test results (Not your @)
required: true
default: U02Q14G80TY
type: string
test_secrets_override_key:
description: 'Key to run tests with custom test secrets'
required: false
type: string


jobs:
automation_benchmark:
environment: integration
Expand All @@ -46,23 +46,11 @@ jobs:
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: Send details to Step Summary
shell: bash
- name: Show test config override path in summary
if: ${{ inputs.test_config_override_path }}
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
echo "### Test config override path" >>$GITHUB_STEP_SUMMARY
echo "\`${{ inputs.test_config_override_path }}\`" >>$GITHUB_STEP_SUMMARY
- name: Build Test Image
uses: ./.github/actions/build-test-image
with:
Expand All @@ -82,13 +70,13 @@ jobs:
TEST_TEST_TYPE: ${{ github.event.inputs.testType }}
RR_MEM: 4Gi
TEST_LOG_LEVEL: info
E2E_TEST_CHAINLINK_IMAGE: ${{ secrets.QA_AWS_ACCOUNT_NUMBER }}.dkr.ecr.${{ secrets.QA_AWS_REGION }}.amazonaws.com/chainlink
E2E_TEST_CHAINLINK_VERSION: ${{ github.sha }} # Default chainlink version if not overrided in the test config
with:
test_command_to_run: cd integration-tests && go test -timeout 30m -v -run ^TestAutomationBenchmark$ ./benchmark -count=1
test_download_vendor_packages_command: make gomod
test_secrets_override_base64: ${{ secrets[inputs.test_secrets_override_key] }}
test_config_override_base64: ${{ env.BASE64_CONFIG_OVERRIDE }}
cl_repo: ${{ env.CHAINLINK_IMAGE }}
cl_image_tag: ${{ env.CHAINLINK_VERSION }}
test_config_override_path: ${{ inputs.test_config_override_path }}
token: ${{ secrets.GITHUB_TOKEN }}
should_cleanup: false
go_mod_path: ./integration-tests/go.mod
Expand Down
38 changes: 17 additions & 21 deletions .github/workflows/on-demand-vrfv2plus-smoke-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,6 @@ name: On Demand VRFV2 Plus Smoke Tests
on:
workflow_dispatch:
inputs:
base64Config:
description: base64-ed config
required: true
type: string
test_suite:
description: "Test Suite to run"
required: true
Expand All @@ -17,6 +13,10 @@ on:
description: "Regex for 'Selected Tests' to run"
required: false
default: "TestVRFv2Plus$/(Link_Billing|Native_Billing|Direct_Funding)|TestVRFV2PlusWithBHS"
test_config_override_path:
description: Path to a test config file used to override the default test config
required: false
type: string
test_secrets_override_key:
description: 'Key to run tests with custom test secrets'
required: false
Expand Down Expand Up @@ -59,27 +59,23 @@ jobs:
uses: actions/checkout@9bb56186c3b09b4f86b1c65136769dd318469633 # v4.1.2
with:
fetch-depth: 0
- name: Mask 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
- name: Merge and export base64 config
uses: ./.github/actions/setup-merge-base64-config
with:
base64Config: ${{ env.BASE64_CONFIG_OVERRIDE }}
- name: Send details to Step Summary
shell: bash
- name: Show test config override path in summary
if: ${{ inputs.test_config_override_path }}
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
echo "### Test config override path" >>$GITHUB_STEP_SUMMARY
echo "\`${{ inputs.test_config_override_path }}\`" >>$GITHUB_STEP_SUMMARY
- name: Run Tests
if: ${{ github.event.inputs.test_suite == 'Selected Tests' }}
uses: smartcontractkit/chainlink-github-actions/chainlink-testing-framework/run-tests@94cb11f4bd545607a2f221c6685052b3abee723d # v2.3.32
env:
E2E_TEST_CHAINLINK_IMAGE: ${{ secrets.QA_AWS_ACCOUNT_NUMBER }}.dkr.ecr.${{ secrets.QA_AWS_REGION }}.amazonaws.com/chainlink
E2E_TEST_CHAINLINK_VERSION: ${{ github.sha }} # Default chainlink version if not overrided in the test config
E2E_TEST_LOKI_TENANT_ID: ${{ secrets.GRAFANA_INTERNAL_TENANT_ID }}
E2E_TEST_LOKI_ENDPOINT: https://${{ secrets.GRAFANA_INTERNAL_HOST }}/loki/api/v1/push
E2E_TEST_LOKI_BASIC_AUTH: ${{ secrets.GRAFANA_INTERNAL_BASIC_AUTH }}
E2E_TEST_GRAFANA_BASE_URL: "http://localhost:8080/primary"
E2E_TEST_GRAFANA_DASHBOARD_URL: "/d/ddf75041-1e39-42af-aa46-361fe4c36e9e/ci-e2e-tests-logs"
E2E_TEST_GRAFANA_BEARER_TOKEN: ${{ secrets.GRAFANA_INTERNAL_URL_SHORTENER_TOKEN }}
with:
test_command_to_run: cd ./integration-tests/smoke && go test -v -count=1 -parallel=1 -timeout 2h -run "${{ inputs.test_list_regex }}" 2>&1 | tee /tmp/gotest.log | gotestloghelper -ci -singlepackage -hidepassingtests=false -hidepassinglogs
test_download_vendor_packages_command: cd ./integration-tests && go mod download
Expand Down

0 comments on commit c0885b4

Please sign in to comment.