on_demand_soak_test #2672
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: E2E Soak Test | |
on: | |
schedule: | |
- cron: '0 0 * * *' | |
workflow_dispatch: | |
inputs: | |
cl_branch_ref: | |
description: Chainlink repo branch to integrate with | |
required: true | |
default: develop | |
type: string | |
ttl: | |
description: The total time for the test to live | |
required: true | |
default: 3h | |
type: string | |
node_count: | |
description: The number of chainlink nodes to use | |
required: true | |
default: '5' | |
type: string | |
env: | |
REF_NAME: ${{ github.head_ref || github.ref_name }} | |
ENV_JOB_IMAGE: ${{ secrets.QA_AWS_ACCOUNT_NUMBER }}.dkr.ecr.${{ secrets.QA_AWS_REGION }}.amazonaws.com/chainlink-solana-tests:${{ github.sha }} | |
CONTRACT_ARTIFACTS_PATH: contracts/target/deploy | |
jobs: | |
get_projectserum_version: | |
name: Get ProjectSerum Version | |
environment: integration | |
runs-on: ubuntu-latest | |
outputs: | |
projectserum_version: ${{ steps.psversion.outputs.projectserum_version }} | |
steps: | |
- name: Checkout the repo | |
uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c # v3.3.0 | |
- name: Get ProjectSerum Version | |
id: psversion | |
uses: ./.github/actions/projectserum_version | |
test-image-exists: | |
environment: integration | |
permissions: | |
checks: write | |
pull-requests: write | |
id-token: write | |
contents: read | |
name: Check If Solana Test Image Exists | |
runs-on: ubuntu-latest | |
outputs: | |
exists: ${{ steps.check-image.outputs.exists }} | |
steps: | |
- name: Check if image exists | |
id: check-image | |
uses: smartcontractkit/chainlink-github-actions/docker/image-exists@336617ae6d70fec60c15cc3382e17a4d2615a801 # v2.2.0 | |
with: | |
repository: chainlink-solana-tests | |
tag: ${{ github.sha }} | |
AWS_REGION: ${{ secrets.QA_AWS_REGION }} | |
AWS_ROLE_TO_ASSUME: ${{ secrets.QA_AWS_ROLE_TO_ASSUME }} | |
soak_testing_build_contracts: | |
name: Soak Testing Build Contracts | |
environment: integration | |
permissions: | |
id-token: write | |
contents: read | |
runs-on: ubuntu-latest | |
needs: [get_projectserum_version, test-image-exists] | |
container: | |
image: projectserum/build:${{ needs.get_projectserum_version.outputs.projectserum_version }} | |
env: | |
RUSTUP_HOME: "/root/.rustup" | |
FORCE_COLOR: 1 | |
steps: | |
- name: Checkout the repo | |
uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c # v3.3.0 | |
- name: Build contracts | |
if: needs.test-image-exists.outputs.exists == 'false' | |
uses: ./.github/actions/build_contract_artifacts | |
soak_testing_build_custom_chainlink_image: | |
name: Soak Testing Build Custom Chainlink Image | |
runs-on: ubuntu-latest | |
environment: integration | |
permissions: | |
id-token: write | |
contents: read | |
steps: | |
- name: Check if image exists | |
id: check-image | |
uses: smartcontractkit/chainlink-github-actions/docker/image-exists@336617ae6d70fec60c15cc3382e17a4d2615a801 # v2.2.0 | |
with: | |
repository: chainlink | |
tag: solana.${{ github.sha }} | |
AWS_REGION: ${{ secrets.QA_AWS_REGION }} | |
AWS_ROLE_TO_ASSUME: ${{ secrets.QA_AWS_ROLE_TO_ASSUME }} | |
- name: Build Image | |
uses: smartcontractkit/chainlink-github-actions/chainlink-testing-framework/build-image@cosmos_one_off # we will want to switch back to this once cosmos cools off336617ae6d70fec60c15cc3382e17a4d2615a801 # v2.2.0 | |
with: | |
cl_repo: smartcontractkit/chainlink | |
cl_ref: ${{ github.event.inputs.cl_branch_ref }} | |
dep_solana_sha: ${{ github.sha }} | |
push_tag: ${{ secrets.QA_AWS_ACCOUNT_NUMBER }}.dkr.ecr.${{ secrets.QA_AWS_REGION }}.amazonaws.com/chainlink:solana.${{ github.sha }} | |
QA_AWS_REGION: ${{ secrets.QA_AWS_REGION }} | |
QA_AWS_ROLE_TO_ASSUME: ${{ secrets.QA_AWS_ROLE_TO_ASSUME }} | |
soak_testing_run_test: | |
name: Soak Testing Run Test | |
environment: integration | |
permissions: | |
checks: write | |
pull-requests: write | |
id-token: write | |
contents: read | |
runs-on: ubuntu-latest | |
needs: [soak_testing_build_contracts, soak_testing_build_custom_chainlink_image] | |
env: | |
DETACH_RUNNER: false | |
TEST_SUITE: soak | |
TEST_ARGS: -test.timeout 4h | |
CHAINLINK_COMMIT_SHA: ${{ github.sha }} | |
CHAINLINK_ENV_USER: ${{ github.actor }} | |
TEST_LOG_LEVEL: debug | |
TTL: ${{ github.event.inputs.ttl }} | |
NODE_COUNT: ${{ github.event.inputs.node_count }} | |
SELECTED_NETWORKS: SIMULATED | |
steps: | |
- name: Checkout the repo | |
uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c # v3.3.0 | |
with: | |
ref: ${{ env.REF_NAME }} | |
- name: Build Test Image | |
uses: ./.github/actions/build-test-image | |
with: | |
artifacts_path: ${{ env.CONTRACT_ARTIFACTS_PATH }} | |
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@336617ae6d70fec60c15cc3382e17a4d2615a801 # v2.2.0 | |
with: | |
test_command_to_run: cd ./integration-tests && go test -timeout 5h -count=1 -json $(args) ./soak 2>&1 | tee /tmp/gotest.log | gotestfmt | |
go_mod_path: ./integration-tests/go.mod | |
cl_repo: ${{ secrets.QA_AWS_ACCOUNT_NUMBER }}.dkr.ecr.${{ secrets.QA_AWS_REGION }}.amazonaws.com/chainlink | |
cl_image_tag: solana.${{ github.sha }} | |
artifacts_location: /home/runner/work/chainlink-solana/chainlink-solana/integration-tests/soak/logs | |
publish_report_paths: ./tests-soak-report.xml | |
publish_check_name: Soak Test Results | |
token: ${{ secrets.GITHUB_TOKEN }} | |
QA_AWS_REGION: ${{ secrets.QA_AWS_REGION }} | |
QA_AWS_ROLE_TO_ASSUME: ${{ secrets.QA_AWS_ROLE_TO_ASSUME }} | |
QA_KUBECONFIG: ${{ secrets.QA_KUBECONFIG }} | |
should_cleanup: false |