e2e_testnet_daily #644
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_testnet_daily | |
on: | |
workflow_dispatch: | |
inputs: | |
cl_branch_ref: | |
description: Chainlink repo branch to integrate with | |
required: true | |
default: develop | |
type: string | |
RPC_URL: | |
description: RPC URL for the tests | |
required: true | |
default: https://api.devnet.solana.com | |
type: string | |
WS_URL: | |
description: WS URL for the tests | |
required: true | |
default: wss://api.devnet.solana.com/ | |
type: string | |
PRIVATE_KEY: | |
description: Private key in byte format [12, 12 ...] | |
required: true | |
type: string | |
schedule: | |
- cron: '0 6 * * *' | |
env: | |
CL_ECR: ${{ secrets.QA_AWS_ACCOUNT_NUMBER }}.dkr.ecr.${{ secrets.QA_AWS_REGION }}.amazonaws.com/chainlink | |
CONTRACT_ARTIFACTS_PATH: contracts/target/deploy | |
# Only run 1 of this workflow at a time per PR | |
concurrency: | |
group: integration-tests-solana-${{ github.ref }} | |
cancel-in-progress: true | |
jobs: | |
changes: | |
environment: integration | |
name: Check Paths That Require Tests To Run | |
runs-on: ubuntu-latest | |
steps: | |
- name: Collect Metrics | |
id: collect-gha-metrics | |
uses: smartcontractkit/push-gha-metrics-action@dea9b546553cb4ca936607c2267a09c004e4ab3f # v3.0.0 | |
with: | |
id: e2e_testnet_daily-changes | |
org-id: ${{ secrets.GRAFANA_INTERNAL_TENANT_ID }} | |
basic-auth: ${{ secrets.GRAFANA_INTERNAL_BASIC_AUTH }} | |
hostname: ${{ secrets.GRAFANA_INTERNAL_HOST }} | |
this-job-name: Check Paths That Require Tests To Run | |
continue-on-error: true | |
- name: Checkout the repo | |
uses: actions/checkout@44c2b7a8a4ea60a981eaca3cf939b5f4305c123b # v4.1.5 | |
- uses: dorny/paths-filter@de90cc6fb38fc0963ad72b210f1f284cd68cea36 # v3.0.2 | |
id: changes | |
with: | |
filters: | | |
src: | |
- '**/*.go' | |
- '**/*go.sum' | |
- '**/*go.mod' | |
- '.github/workflows/integration-tests.yml' | |
- '**/*Dockerfile' | |
- 'core/**/config/**/*.toml' | |
outputs: | |
src: ${{ steps.changes.outputs.src }} | |
get_solana_sha: | |
name: Get Solana Sha From Go Mod | |
environment: Integration | |
runs-on: ubuntu-latest | |
outputs: | |
sha: ${{ github.sha }} | |
steps: | |
- name: Checkout the repo | |
uses: actions/checkout@44c2b7a8a4ea60a981eaca3cf939b5f4305c123b # v4.1.5 | |
with: | |
ref: ${{ github.event.pull_request.head.sha || github.event.merge_group.head_sha }} | |
- name: Setup Go | |
uses: ./.github/actions/setup-go | |
with: | |
only-modules: "true" | |
- name: Get the sha from go mod | |
id: getshortsha | |
run: | | |
short_sha=$(git rev-parse --short HEAD) | |
echo "short sha is: ${short_sha}" | |
echo "short_sha=${short_sha}" >> "$GITHUB_OUTPUT" | |
- name: Checkout solana | |
uses: actions/checkout@44c2b7a8a4ea60a981eaca3cf939b5f4305c123b # v4.1.5 | |
with: | |
repository: smartcontractkit/chainlink-solana | |
ref: develop | |
fetch-depth: 0 | |
path: solanapath | |
get_projectserum_version: | |
name: Get ProjectSerum Version | |
environment: integration | |
runs-on: ubuntu-latest | |
needs: [ get_solana_sha ] | |
outputs: | |
projectserum_version: ${{ steps.psversion.outputs.projectserum_version }} | |
steps: | |
- name: Checkout the solana repo | |
uses: actions/checkout@44c2b7a8a4ea60a981eaca3cf939b5f4305c123b # v4.1.5 | |
with: | |
repository: smartcontractkit/chainlink-solana | |
ref: ${{ needs.get_solana_sha.outputs.sha }} | |
- name: Get ProjectSerum Version | |
id: psversion | |
uses: smartcontractkit/chainlink-solana/.github/actions/projectserum_version@4b971869e26b79c7ce3fb7c98005cc2e3f350915 # stable action on Oct 12 2022 | |
solana-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 | |
needs: [ get_solana_sha ] | |
outputs: | |
exists: ${{ steps.check-image.outputs.exists }} | |
steps: | |
- name: Check if image exists | |
id: check-image | |
uses: smartcontractkit/chainlink-github-actions/docker/image-exists@e29366cdecfe6befff9ab8c3cfe4825218505d58 # v2.3.16 | |
with: | |
repository: chainlink-solana-tests | |
tag: ${{ needs.get_solana_sha.outputs.sha }} | |
AWS_REGION: ${{ secrets.QA_AWS_REGION }} | |
AWS_ROLE_TO_ASSUME: ${{ secrets.QA_AWS_ROLE_TO_ASSUME }} | |
e2e_custom_build_artifacts: | |
name: Solana Build Artifacts | |
runs-on: ubuntu20.04-16cores-64GB | |
needs: | |
[ | |
changes, | |
get_projectserum_version, | |
solana-test-image-exists, | |
get_solana_sha, | |
] | |
# container: | |
# image: projectserum/build:${{ needs.get_projectserum_version.outputs.projectserum_version }} | |
# env: | |
# RUSTUP_HOME: "/root/.rustup" | |
# FORCE_COLOR: 1 | |
steps: | |
- name: Collect Metrics | |
if: needs.changes.outputs.src == 'true' | |
id: collect-gha-metrics | |
uses: smartcontractkit/push-gha-metrics-action@dea9b546553cb4ca936607c2267a09c004e4ab3f # v3.0.0 | |
with: | |
id: e2e_testnet_daily-build-artifacts | |
org-id: ${{ secrets.GRAFANA_INTERNAL_TENANT_ID }} | |
basic-auth: ${{ secrets.GRAFANA_INTERNAL_BASIC_AUTH }} | |
hostname: ${{ secrets.GRAFANA_INTERNAL_HOST }} | |
this-job-name: Solana Build Artifacts | |
continue-on-error: true | |
- name: Checkout the solana repo | |
# Use v3.6.0 because the custom runner (container configured above) | |
# doesn't have node20 installed which is required for versions >=4 | |
uses: actions/checkout@44c2b7a8a4ea60a981eaca3cf939b5f4305c123b # v4.1.5 | |
with: | |
repository: smartcontractkit/chainlink-solana | |
ref: ${{ needs.get_solana_sha.outputs.sha }} | |
- name: Build contracts | |
if: needs.changes.outputs.src == 'true' && needs.solana-test-image-exists.outputs.exists == 'false' | |
uses: ./.github/actions/build_contract_artifacts | |
with: | |
ref: ${{ needs.get_solana_sha.outputs.sha }} | |
image: projectserum/build | |
image-version: ${{ needs.get_projectserum_version.outputs.projectserum_version }} | |
e2e_custom_build_custom_chainlink_image: | |
name: E2E Custom Build Custom CL 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@e29366cdecfe6befff9ab8c3cfe4825218505d58 # v2.3.16 | |
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 | |
if: steps.check-image.outputs.exists == 'false' | |
uses: smartcontractkit/chainlink-github-actions/chainlink-testing-framework/build-image@e29366cdecfe6befff9ab8c3cfe4825218505d58 # v2.3.16 | |
with: | |
should_checkout: true | |
cl_repo: smartcontractkit/chainlink | |
cl_ref: ${{ github.event.inputs.cl_branch_ref }} | |
dep_solana_sha: ${{ github.event.pull_request.head.sha }} | |
push_tag: ${{ env.CL_ECR }}:solana.${{ github.sha }} | |
QA_AWS_REGION: ${{ secrets.QA_AWS_REGION }} | |
QA_AWS_ROLE_TO_ASSUME: ${{ secrets.QA_AWS_ROLE_TO_ASSUME }} | |
build_test_image: | |
environment: integration | |
permissions: | |
id-token: write | |
contents: read | |
name: Build Test Image | |
runs-on: ubuntu-latest | |
needs: [e2e_custom_build_artifacts, changes, solana-test-image-exists, get_solana_sha] | |
steps: | |
- name: Collect Metrics | |
id: collect-gha-metrics | |
uses: smartcontractkit/push-gha-metrics-action@dea9b546553cb4ca936607c2267a09c004e4ab3f # v3.0.0 | |
with: | |
id: e2e_testnet_daily-build-test-image | |
org-id: ${{ secrets.GRAFANA_INTERNAL_TENANT_ID }} | |
basic-auth: ${{ secrets.GRAFANA_INTERNAL_BASIC_AUTH }} | |
hostname: ${{ secrets.GRAFANA_INTERNAL_HOST }} | |
this-job-name: Build Test Image | |
continue-on-error: true | |
- name: Checkout the repo | |
uses: actions/checkout@44c2b7a8a4ea60a981eaca3cf939b5f4305c123b # v4.1.5 | |
with: | |
ref: ${{ github.event.pull_request.head.sha || github.event.merge_group.head_sha }} | |
- name: Build Test Image | |
if: needs.changes.outputs.src == 'true' && needs.solana-test-image-exists.outputs.exists == 'false' | |
uses: ./.github/actions/build-test-image | |
with: | |
tag: ${{ needs.get_solana_sha.outputs.sha }} | |
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 }} | |
- run: echo "this exists so we don't have to run anything else if the build is skipped" | |
if: needs.changes.outputs.src == 'false' || needs.solana-test-image-exists.outputs.exists == 'true' | |
e2e_custom_run_daily_testnet_smoke_tests: | |
name: E2E Run Daily Smoke Tests | |
environment: integration | |
permissions: | |
checks: write | |
pull-requests: write | |
id-token: write | |
contents: read | |
runs-on: ubuntu-latest | |
needs: [e2e_custom_build_artifacts, e2e_custom_build_custom_chainlink_image, build_test_image] | |
env: | |
TEST_SUITE: smoke | |
TEST_ARGS: -test.timeout 30m | |
CHAINLINK_COMMIT_SHA: ${{ github.sha }} | |
CHAINLINK_ENV_USER: ${{ github.actor }} | |
TEST_LOG_LEVEL: debug | |
SELECTED_NETWORKS: SIMULATED | |
RPC_URL: ${{ github.event_name == 'workflow_dispatch' && github.event.inputs.RPC_URL || 'https://api.devnet.solana.com' }} | |
WS_URL: ${{ github.event_name == 'workflow_dispatch' && github.event.inputs.WS_URL || 'wss://api.devnet.solana.com/' }} | |
PROGRAM_ID_OCR2: cjg3oHmg9uuPsP8D6g29NWvhySJkdYdAo9D25PRbKXJ | |
PROGRAM_ID_ACCESS_CONTROLLER: 9xi644bRR8birboDGdTiwBq3C7VEeR7VuamRYYXCubUW | |
PROGRAM_ID_STORE: HEvSKofvBgfaexv23kMabbYqxasxU3mQ4ibBMEmJWHny | |
LINK_TOKEN: 7CF1GrsZsny5j9JESPj98MdYVZK38RE8ZpmTEMwECK4c | |
VAULT_ADDRESS: FdM4dnhVpFQfjPqNG6LEfzArhuGhUjtidYu89qtGwJCS | |
PRIVATE_KEY: ${{ github.event_name == 'workflow_dispatch' && github.event.inputs.PRIVATE_KEY || secrets.PRIVATE_KEY }} | |
INTERNAL_DOCKER_REPO: ${{ secrets.QA_AWS_ACCOUNT_NUMBER }}.dkr.ecr.${{ secrets.QA_AWS_REGION }}.amazonaws.com | |
steps: | |
- name: Collect Metrics | |
id: collect-gha-metrics | |
uses: smartcontractkit/push-gha-metrics-action@dea9b546553cb4ca936607c2267a09c004e4ab3f # v3.0.0 | |
with: | |
id: e2e_custom_run_daily_testnet_smoke_tests | |
org-id: ${{ secrets.GRAFANA_INTERNAL_TENANT_ID }} | |
basic-auth: ${{ secrets.GRAFANA_INTERNAL_BASIC_AUTH }} | |
hostname: ${{ secrets.GRAFANA_INTERNAL_HOST }} | |
this-job-name: E2E Run Daily Smoke Tests | |
continue-on-error: true | |
- name: Checkout the repo | |
uses: actions/checkout@44c2b7a8a4ea60a981eaca3cf939b5f4305c123b # v4.1.5 | |
- name: Run Tests | |
uses: smartcontractkit/chainlink-github-actions/chainlink-testing-framework/run-tests@e29366cdecfe6befff9ab8c3cfe4825218505d58 # v2.3.16 | |
with: | |
test_command_to_run: cd ./integration-tests && go test -timeout 24h -count=1 -run TestSolanaGauntletOCRV2Smoke -json $(args) ./smoke 2>&1 | tee /tmp/gotest.log | gotestfmt | |
go_mod_path: ./integration-tests/go.mod | |
cl_repo: ${{ env.CL_ECR }} | |
cl_image_tag: solana.${{ github.sha }} | |
artifacts_location: /home/runner/work/chainlink-solana/chainlink-solana/integration-tests/logs | |
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 |