Skip to content

commit ocr2 report test #1505

commit ocr2 report test

commit ocr2 report test #1505

name: CCIP Client Compatibility Tests
on:

Check failure on line 2 in .github/workflows/ccip-client-compatibility-tests.yml

View workflow run for this annotation

GitHub Actions / .github/workflows/ccip-client-compatibility-tests.yml

Invalid workflow file

You have an error in your yaml syntax on line 2
push:
tags:
- '*'
# TODO: Uncomment when CCIP-2255 is resolved
schedule:
- cron: "30 5 * * *"
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
jobs:
# Build Test Dependencies
build-chainlink:
environment: integration
permissions:
id-token: write
contents: read
name: Build Chainlink Image
runs-on: ubuntu-latest
steps:
- name: Collect Metrics
id: collect-gha-metrics
uses: smartcontractkit/push-gha-metrics-action@dea9b546553cb4ca936607c2267a09c004e4ab3f # v3.0.0
with:
id: client-compatablility-build-chainlink
org-id: ${{ secrets.GRAFANA_INTERNAL_TENANT_ID }}
basic-auth: ${{ secrets.GRAFANA_INTERNAL_BASIC_AUTH }}
hostname: ${{ secrets.GRAFANA_INTERNAL_HOST }}
this-job-name: Build Chainlink Image
continue-on-error: true
- name: Checkout the repo
uses: actions/checkout@9bb56186c3b09b4f86b1c65136769dd318469633 # v4.1.2
with:
repository: smartcontractkit/ccip
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 }}
AWS_REGION: ${{ secrets.QA_AWS_REGION }}
AWS_ROLE_TO_ASSUME: ${{ secrets.QA_AWS_ROLE_TO_ASSUME }}
check-ecr-images-exist:
environment: integration
permissions:
id-token: write
contents: read
name: Check images used as test dependencies exist in ECR
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
mirror:
- name: ethereum/client-go
expression: '^(alltools-v|v)[0-9]\.[0-9]+\.[0-9]+$'
- name: hyperledger/besu
expression: '^[0-9]+\.[0-9]+(\.[0-9]+)?$'
page_size: 300
- name: thorax/erigon
expression: '^v[0-9]+\.[0-9]+\.[0-9]+$'
- name: nethermind/nethermind
expression: '^[0-9]+\.[0-9]+\.[0-9]+$'
steps:
- name: Update internal ECR if the latest Ethereum client image does not exist
uses: smartcontractkit/chainlink-testing-framework/.github/actions/update-internal-mirrors@7eb04a030823b316d8dd5bb555f1e49593a503fc #v1.28.16
with:
aws_region: ${{ secrets.QA_AWS_REGION }}
role_to_assume: ${{ secrets.QA_AWS_ROLE_TO_ASSUME }}
aws_account_number: ${{ secrets.QA_AWS_ACCOUNT_NUMBER }}
image_name: ${{ matrix.mirror.name }}
expression: ${{ matrix.mirror.expression }}
page_size: ${{ matrix.mirror.page_size }}
get-latest-available-images:
environment: integration
runs-on: ubuntu-latest
needs: [check-ecr-images-exist]
permissions:
id-token: write
contents: read
outputs:
geth_tag: ${{ env.GETH_TAG }}
nethermind_tag: ${{ env.NETHERMIND_TAG }}
besu_tag: ${{ env.BESU_TAG }}
erigon_tag: ${{ env.ERIGON_TAG }}
steps:
# Setup AWS creds
- name: Configure AWS Credentials
uses: aws-actions/configure-aws-credentials@e3dd6a429d7300a6a4c196c26e071d42e0343502 # v4.0.2
with:
aws-region: ${{ secrets.QA_AWS_REGION }}
role-to-assume: ${{ secrets.QA_AWS_ROLE_TO_ASSUME }}
role-duration-seconds: 3600
# Login to ECR
- name: Login to Amazon ECR
id: login-ecr
uses: aws-actions/amazon-ecr-login@062b18b96a7aff071d4dc91bc00c4c1a7945b076 # v2.0.1
with:
mask-password: "true"
env:
AWS_REGION: ${{ secrets.QA_AWS_REGION }}
- name: Get latest docker images from ECR
run: |
function get_latest_version_tag() {
local repository_name="$1"
local grep_string="$2"
local tag
# get the list of images with aws cli
# jq then filters out only the first tags
# sort the semantic tags into order
# grep only the versions that fit the regex
# then take the first one
tag=$(aws ecr describe-images --repository-name ${repository_name} --region ${{ secrets.QA_AWS_REGION }} --output json --query 'imageDetails[?imageTags!=`null` && imageTags!=`[]`]' |\
jq -r '.[] | .imageTags[0]' |\
sort -rV |\
grep -E ${grep_string} |\
head -n 1)
if [ -z "$tag" ]; then
echo "Failed to get latest ${repository_name} tag"
exit 1
fi
echo $tag
}
geth_tag=$(get_latest_version_tag ethereum/client-go '^v[0-9]+\.[0-9]+\.[0-9]+$')
echo "GETH_TAG=$geth_tag" >> $GITHUB_ENV
echo "Geth latest tag: $geth_tag"
nethermind_tag=$(get_latest_version_tag nethermind/nethermind '^[0-9]+\.[0-9]+\.[0-9]+$')
echo "NETHERMIND_TAG=$nethermind_tag" >> $GITHUB_ENV
echo "Nethermind latest tag: $nethermind_tag"
besu_tag=$(get_latest_version_tag hyperledger/besu '^[0-9]+\.[0-9]+(\.[0-9]+)?$')
echo "BESU_TAG=$besu_tag" >> $GITHUB_ENV
echo "Besu latest tag: $besu_tag"
erigon_tag=$(get_latest_version_tag thorax/erigon '^v[0-9]+\.[0-9]+\.[0-9]+$')
echo "ERIGON_TAG=$erigon_tag" >> $GITHUB_ENV
echo "Erigon latest tag: $erigon_tag"
# End Build Test Dependencies
ccip-compatibility-matrix:
environment: integration
permissions:
checks: write
pull-requests: write
id-token: write
contents: read
needs: [build-chainlink, get-latest-available-images]
env:
CHAINLINK_COMMIT_SHA: ${{ github.sha }}
CHAINLINK_ENV_USER: ${{ github.actor }}
TEST_LOG_LEVEL: debug
strategy:
fail-fast: false
matrix:
include:
- name: bidirectional-lane-geth
os: ubuntu-latest
test: TestSmokeCCIPForBidirectionalLane
client: geth
pyroscope_env: ci-ccip-bidirectional-lane-geth
chainConfig: "1337=ethereum/client-go:${{ needs.get-latest-available-images.outputs.geth_tag }},2337=ethereum/client-go:${{ needs.get-latest-available-images.outputs.geth_tag }}"
networks: "SIMULATED_1,SIMULATED_2"
# TODO: uncomment when nethermind flake reason is addressed
# - name: bidirectional-lane-nethermind
# test: TestSmokeCCIPForBidirectionalLane
# client: nethermind
# pyroscope_env: ci-ccip-bidirectional-lane-nethermind
# chainConfig: "1337=nethermind/nethermind:${{ needs.get-latest-available-images.outputs.nethermind_tag }},2337=nethermind/nethermind:${{ needs.get-latest-available-images.outputs.nethermind_tag }}"
# networks: "SIMULATED_1,SIMULATED_2"
- name: bidirectional-lane-besu
test: TestSmokeCCIPForBidirectionalLane
client: besu
pyroscope_env: ci-ccip-bidirectional-lane-besu
chainConfig: "1337=hyperledger/besu:${{ needs.get-latest-available-images.outputs.besu_tag }},2337=hyperledger/besu:${{ needs.get-latest-available-images.outputs.besu_tag }}"
networks: "SIMULATED_BESU_NONDEV_1,SIMULATED_BESU_NONDEV_2"
# TODO: Waiting for CCIP-2255 to be resolved
# - name: bidirectional-lane-erigon
# test: TestSmokeCCIPForBidirectionalLane
# client: erigon
# pyroscope_env: ci-ccip-bidirectional-lane-erigon
# chainConfig: "1337=thorax/erigon:${{ needs.get-latest-available-images.outputs.erigon_tag }},2337=thorax/erigon:${{ needs.get-latest-available-images.outputs.erigon_tag }}"
# networks: "SIMULATED_1,SIMULATED_2"
runs-on: ubuntu-latest
name: CCIP Latest EVM Node Compatibility Test with ${{ matrix.client }}
steps:
- name: Collect Metrics
id: collect-gha-metrics
uses: smartcontractkit/push-gha-metrics-action@dea9b546553cb4ca936607c2267a09c004e4ab3f # v3.0.0
with:
id: ccip-client-compatibility-test-${{ matrix.client }}
org-id: ${{ secrets.GRAFANA_INTERNAL_TENANT_ID }}
basic-auth: ${{ secrets.GRAFANA_INTERNAL_BASIC_AUTH }}
hostname: ${{ secrets.GRAFANA_INTERNAL_HOST }}
this-job-name: CCIP Latest EVM Node Compatibility Test with ${{ matrix.client }}
test-results-file: '{"testType":"go","filePath":"/tmp/gotest.log"}'
- name: Checkout the repo
uses: actions/checkout@9bb56186c3b09b4f86b1c65136769dd318469633 # v4.1.2
with:
repository: smartcontractkit/ccip
ref: ${{ github.event.pull_request.head.sha || github.event.merge_group.head_sha }}
- name: Build Go Test Command
id: build-go-test-command
run: |
# if the matrix.test is set, use it for a different command
if [ "${{ matrix.test }}" != "" ]; then
echo "run_command=-run '^${{ matrix.test }}$' ./ccip-tests/smoke/ccip_test.go" >> "$GITHUB_OUTPUT"
else
echo "run_command=./ccip-tests/smoke/ccip_test.go" >> "$GITHUB_OUTPUT"
fi
- name: Prepare Base64 TOML override
uses: ./.github/actions/setup-create-base64-config
with:
runId: ${{ github.run_id }}
testLogCollect: ${{ vars.TEST_LOG_COLLECT }}
selectedNetworks: ${{ matrix.networks }}
chainlinkImage: ${{ env.CHAINLINK_IMAGE }}
chainlinkVersion: ${{ github.sha }}
pyroscopeServer: ${{ matrix.pyroscope_env == '' && '' || !startsWith(github.ref, 'refs/tags/') && '' || secrets.QA_PYROSCOPE_INSTANCE }} # Avoid sending blank envs https://github.com/orgs/community/discussions/25725
pyroscopeEnvironment: ${{ matrix.pyroscope_env }}
pyroscopeKey: ${{ secrets.QA_PYROSCOPE_KEY }}
lokiEndpoint: ${{ secrets.LOKI_URL_CI }}
lokiTenantId: ${{ vars.LOKI_TENANT_ID }}
lokiBasicAuth: ${{ secrets.LOKI_BASIC_AUTH }}
logstreamLogTargets: ${{ vars.LOGSTREAM_LOG_TARGETS }}
grafanaUrl: ${{ vars.GRAFANA_URL }}
grafanaDashboardUrl: "/d/ddf75041-1e39-42af-aa46-361fe4c36e9e/ci-e2e-tests-logs"
- name: Prepare Base64 TOML override for CCIP secrets
uses: ./.github/actions/setup-create-base64-config-ccip
with:
runId: ${{ github.run_id }}
testLogCollect: ${{ vars.TEST_LOG_COLLECT }}
selectedNetworks: ${{ matrix.networks }}
chainlinkImage: ${{ env.CHAINLINK_IMAGE }}
chainlinkVersion: ${{ github.sha }}
lokiEndpoint: ${{ secrets.LOKI_URL_CI }}
lokiTenantId: ${{ vars.LOKI_TENANT_ID }}
lokiBasicAuth: ${{ secrets.LOKI_BASIC_AUTH }}
logstreamLogTargets: ${{ vars.LOGSTREAM_LOG_TARGETS }}
grafanaUrl: ${{ vars.GRAFANA_URL }}
grafanaDashboardUrl: "/d/ddf75041-1e39-42af-aa46-361fe4c36e9e/ci-e2e-tests-logs"
customEvmNodes: ${{ matrix.chainConfig }}
evmNodeLogLevel: "trace"
- name: Run Tests
uses: smartcontractkit/chainlink-github-actions/chainlink-testing-framework/run-tests@b49a9d04744b0237908831730f8553f26d73a94b # v2.3.17
with:
test_command_to_run: cd ./integration-tests && go test -timeout 30m -count=1 -json -test.parallel=2 ${{ steps.build-go-test-command.outputs.run_command }} 2>&1 | tee /tmp/gotest.log | gotestloghelper -ci
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 }}
artifacts_name: ${{ matrix.client }}-test-logs
artifacts_location: |
./integration-tests/smoke/logs/
./integration-tests/ccip-tests/smoke/logs/*
/tmp/gotest.log
publish_check_name: ${{ matrix.name }}
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: ""
should_tidy: "false"
- name: Print failed test summary
if: always()
uses: smartcontractkit/chainlink-github-actions/chainlink-testing-framework/show-test-summary@b49a9d04744b0237908831730f8553f26d73a94b # v2.3.17
with:
test_directory: ./integration-tests/ccip-tests/smoke/
start-slack-thread:
name: Start Slack Thread
if: ${{ always() && needs.*.result != 'skipped' && needs.*.result != 'cancelled' && github.event_name != 'workflow_dispatch' }}
environment: integration
outputs:
thread_ts: ${{ steps.slack.outputs.thread_ts }}
permissions:
checks: write
pull-requests: write
id-token: write
contents: read
runs-on: ubuntu-latest
needs: ccip-compatibility-matrix
steps:
- name: Debug Result
run: echo ${{ join(needs.*.result, ',') }}
- name: Main Slack Notification
uses: slackapi/slack-github-action@6c661ce58804a1a20f6dc5fbee7f0381b469e001 # v1.25.0
id: slack
with:
channel-id: ${{ secrets.QA_CCIP_SLACK_CHANNEL }}
payload: |
{
"attachments": [
{
"color": "${{ contains(join(needs.*.result, ','), 'failure') && '#C62828' || '#2E7D32' }}",
"blocks": [
{
"type": "header",
"text": {
"type": "plain_text",
"text": "CCIP EVM Node Compatability Test Results ${{ contains(join(needs.*.result, ','), 'failure') && ':x:' || ':white_check_mark:'}}",
"emoji": true
}
},
{
"type": "section",
"text": {
"type": "mrkdwn",
"text": "${{ contains(join(needs.*.result, ','), 'failure') && 'Some tests failed, notifying <@U060CGGPY8H> & <@U03GWA0NSF7>' || 'All Good!' }}"
}
},
{
"type": "divider"
},
{
"type": "section",
"text": {
"type": "mrkdwn",
"text": "<${{ github.server_url }}/${{ github.repository }}/releases/tag/${{ github.ref_name }}|${{ github.ref_name }}> | <${{ github.server_url }}/${{ github.repository }}/commit/${{ github.sha }}|${{ github.sha }}> | <${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}|Run>"
}
}
]
}
]
}
env:
SLACK_BOT_TOKEN: ${{ secrets.QA_SLACK_API_KEY }}
post-test-results-to-slack:
name: Post Test Results
if: ${{ always() && needs.*.result != 'skipped' && needs.*.result != 'cancelled' && github.event_name != 'workflow_dispatch' }}
environment: integration
permissions:
checks: write
pull-requests: write
id-token: write
contents: read
runs-on: ubuntu-latest
needs: start-slack-thread
steps:
- name: Checkout the repo
uses: actions/checkout@9bb56186c3b09b4f86b1c65136769dd318469633 # v4.1.2
with:
ref: ${{ github.event.pull_request.head.sha || github.event.merge_group.head_sha }}
- name: Post Test Results to Slack
uses: ./.github/actions/notify-slack-jobs-result
with:
github_token: ${{ github.token }}
github_repository: ${{ github.repository }}
workflow_run_id: ${{ github.run_id }}
github_job_name_regex: ^CCIP Latest EVM Node Compatibility Test with (?<cap>.*?)$
message_title: CCIP Compatibility Test Results
slack_channel_id: ${{ secrets.QA_CCIP_SLACK_CHANNEL }}
slack_bot_token: ${{ secrets.QA_SLACK_API_KEY }}
slack_thread_ts: ${{ needs.start-slack-thread.outputs.thread_ts }}