Live Testnet Tests #58
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: Live Testnet Tests | |
on: | |
schedule: | |
- cron: "0 0 * * *" # Run nightly | |
push: | |
tags: | |
- "*" | |
workflow_dispatch: | |
env: | |
CHAINLINK_IMAGE: ${{ secrets.QA_AWS_ACCOUNT_NUMBER }}.dkr.ecr.${{ secrets.QA_AWS_REGION }}.amazonaws.com/chainlink | |
INTERNAL_DOCKER_REPO: ${{ secrets.QA_AWS_ACCOUNT_NUMBER }}.dkr.ecr.${{ secrets.QA_AWS_REGION }}.amazonaws.com | |
MOD_CACHE_VERSION: 2 | |
CHAINLINK_NODE_FUNDING: .1 | |
CHAINLINK_COMMIT_SHA: ${{ github.sha }} | |
CHAINLINK_ENV_USER: ${{ github.actor }} | |
TEST_LOG_LEVEL: debug | |
EVM_KEYS: ${{ secrets.QA_EVM_KEYS }} | |
SEPOLIA_URLS: ${{ secrets.QA_SEPOLIA_URLS }} | |
SEPOLIA_HTTP_URLS: ${{ secrets.QA_SEPOLIA_HTTP_URLS }} | |
OPTIMISM_GOERLI_URLS: ${{ secrets.QA_OPTIMISM_GOERLI_URLS }} | |
OPTIMISM_GOERLI_HTTP_URLS: ${{ secrets.QA_OPTIMISM_GOERLI_HTTP_URLS }} | |
ARBITRUM_GOERLI_URLS: ${{ secrets.QA_ARBITRUM_GOERLI_URLS }} | |
ARBITRUM_GOERLI_HTTP_URLS: ${{ secrets.QA_ARBITRUM_GOERLI_HTTP_URLS }} | |
jobs: | |
build-chainlink: | |
environment: integration | |
permissions: | |
id-token: write | |
contents: read | |
name: Build Chainlink Image | |
runs-on: ubuntu20.04-16cores-64GB | |
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: Build Chainlink Image | |
continue-on-error: true | |
- name: Checkout the repo | |
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 | |
with: | |
ref: ${{ github.event.pull_request.head.sha || github.event.merge_group.head_sha }} | |
- name: Build Chainlink Image | |
uses: ./.github/actions/build-chainlink-image | |
with: | |
tag_suffix: "" | |
dockerfile: core/chainlink.Dockerfile | |
git_commit_sha: ${{ github.sha }} | |
GRAFANA_CLOUD_BASIC_AUTH: ${{ secrets.GRAFANA_CLOUD_BASIC_AUTH }} | |
GRAFANA_CLOUD_HOST: ${{ secrets.GRAFANA_CLOUD_HOST }} | |
AWS_REGION: ${{ secrets.QA_AWS_REGION }} | |
AWS_ROLE_TO_ASSUME: ${{ secrets.QA_AWS_ROLE_TO_ASSUME }} | |
build-tests: | |
environment: integration | |
permissions: | |
id-token: write | |
contents: read | |
name: Build Tests Binary | |
runs-on: ubuntu20.04-16cores-64GB | |
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: Build Chainlink Image | |
continue-on-error: true | |
- name: Checkout the repo | |
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 | |
with: | |
ref: ${{ github.event.pull_request.head.sha || github.event.merge_group.head_sha }} | |
- name: Build Tests | |
uses: smartcontractkit/chainlink-github-actions/chainlink-testing-framework/build-tests@c564d542ef14c3351a02746666e4dca60b6728da # v2.2.16 | |
with: | |
test_download_vendor_packages_command: cd ./integration-tests && go mod download | |
token: ${{ secrets.GITHUB_TOKEN }} | |
go_mod_path: ./integration-tests/go.mod | |
cache_key_id: core-e2e-${{ env.MOD_CACHE_VERSION }} | |
cache_restore_only: "true" | |
binary_name: tests | |
# End Reporting Jobs | |
smoke-tests-1: | |
environment: integration | |
permissions: | |
checks: write | |
pull-requests: write | |
id-token: write | |
contents: read | |
needs: [build-chainlink, build-tests] | |
env: | |
SELECTED_NETWORKS: SIMULATED | |
strategy: | |
max-parallel: 1 | |
fail-fast: false | |
matrix: | |
include: # https://docs.github.com/en/actions/using-jobs/using-a-matrix-for-your-jobs#example-adding-configurations | |
- product: OCR | |
test: TestOCRBasic | |
name: 1 ${{ matrix.product }} Tests | |
runs-on: ubuntu-latest | |
steps: | |
- name: Download Tests Binary | |
uses: actions/download-artifact@9bc31d5ccc31df68ecc42ccf4149144866c47d8a # v3.0.2 | |
with: | |
name: tests | |
- name: Run Tests | |
uses: smartcontractkit/chainlink-github-actions/chainlink-testing-framework/run-tests-binary@c564d542ef14c3351a02746666e4dca60b6728da # v2.2.16 | |
env: | |
PYROSCOPE_SERVER: ${{ secrets.QA_PYROSCOPE_INSTANCE }} | |
PYROSCOPE_ENVIRONMENT: ci-smoke-${{ matrix.product }}-sepolia | |
PYROSCOPE_KEY: ${{ secrets.QA_PYROSCOPE_KEY }} | |
with: | |
test_command_to_run: ./tests -test.timeout 30m -test.count=1 -json -test.parallel=1 -test.run ${{ matrix.test }} 2>&1 | tee /tmp/gotest.log | gotestfmt | |
test_download_vendor_packages_command: cd ./integration-tests && go mod download | |
cl_repo: ${{ env.CHAINLINK_IMAGE }} | |
cl_image_tag: ${{ github.sha }} | |
aws_registries: ${{ secrets.QA_AWS_ACCOUNT_NUMBER }} | |
dockerhub_username: ${{ secrets.DOCKERHUB_READONLY_USERNAME }} | |
dockerhub_password: ${{ secrets.DOCKERHUB_READONLY_PASSWORD }} | |
artifacts_location: ./integration-tests/smoke/logs | |
publish_check_name: 1 ${{ matrix.product }} Smoke Test Results | |
token: ${{ secrets.GITHUB_TOKEN }} | |
go_mod_path: ./integration-tests/go.mod | |
cache_key_id: core-e2e-${{ env.MOD_CACHE_VERSION }} | |
cache_restore_only: "true" | |
QA_AWS_REGION: ${{ secrets.QA_AWS_REGION }} | |
QA_AWS_ROLE_TO_ASSUME: ${{ secrets.QA_AWS_ROLE_TO_ASSUME }} | |
QA_KUBECONFIG: ${{ secrets.QA_KUBECONFIG }} | |
- name: Collect Metrics | |
if: always() | |
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: Sepolia ${{ matrix.product }} Tests | |
test-results-file: '{"testType":"go","filePath":"/tmp/gotest.log"}' | |
continue-on-error: true | |
smoke-tests-2: | |
environment: integration | |
permissions: | |
checks: write | |
pull-requests: write | |
id-token: write | |
contents: read | |
needs: [build-chainlink, build-tests] | |
env: | |
SELECTED_NETWORKS: SIMULATED | |
strategy: | |
max-parallel: 1 | |
fail-fast: false | |
matrix: | |
include: # https://docs.github.com/en/actions/using-jobs/using-a-matrix-for-your-jobs#example-adding-configurations | |
- product: OCR | |
test: TestOCRBasic | |
name: 2 ${{ matrix.product }} Tests | |
runs-on: ubuntu-latest | |
steps: | |
- name: Download Tests Binary | |
uses: actions/download-artifact@9bc31d5ccc31df68ecc42ccf4149144866c47d8a # v3.0.2 | |
with: | |
name: tests | |
- name: Run Tests | |
uses: smartcontractkit/chainlink-github-actions/chainlink-testing-framework/run-tests@e865e376b8c2d594028c8d645dd6c47169b72974 # v2.2.16 | |
env: | |
PYROSCOPE_SERVER: ${{ secrets.QA_PYROSCOPE_INSTANCE }} | |
PYROSCOPE_ENVIRONMENT: ci-smoke-${{ matrix.product }}-sepolia | |
PYROSCOPE_KEY: ${{ secrets.QA_PYROSCOPE_KEY }} | |
with: | |
test_command_to_run: ./tests -test.timeout 30m -test.count=1 -json -test.parallel=1 -test.run ${{ matrix.test }} 2>&1 | tee /tmp/gotest.log | gotestfmt | |
test_download_vendor_packages_command: cd ./integration-tests && go mod download | |
cl_repo: ${{ env.CHAINLINK_IMAGE }} | |
cl_image_tag: ${{ github.sha }} | |
aws_registries: ${{ secrets.QA_AWS_ACCOUNT_NUMBER }} | |
dockerhub_username: ${{ secrets.DOCKERHUB_READONLY_USERNAME }} | |
dockerhub_password: ${{ secrets.DOCKERHUB_READONLY_PASSWORD }} | |
artifacts_location: ./integration-tests/smoke/logs | |
publish_check_name: 2 ${{ matrix.product }} Smoke Test Results | |
token: ${{ secrets.GITHUB_TOKEN }} | |
go_mod_path: ./integration-tests/go.mod | |
cache_key_id: core-e2e-${{ env.MOD_CACHE_VERSION }} | |
cache_restore_only: "true" | |
QA_AWS_REGION: ${{ secrets.QA_AWS_REGION }} | |
QA_AWS_ROLE_TO_ASSUME: ${{ secrets.QA_AWS_ROLE_TO_ASSUME }} | |
QA_KUBECONFIG: ${{ secrets.QA_KUBECONFIG }} | |
- name: Collect Metrics | |
if: always() | |
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: Sepolia ${{ matrix.product }} Tests | |
test-results-file: '{"testType":"go","filePath":"/tmp/gotest.log"}' | |
continue-on-error: true | |