From 02d17d26cac6ceab34e49f4c0dfb946e76f7a2ba Mon Sep 17 00:00:00 2001 From: lukaszcl <120112546+lukaszcl@users.noreply.github.com> Date: Mon, 12 Aug 2024 10:33:29 +0200 Subject: [PATCH] wip --- .github/e2e-tests.yml | 4 +- .github/workflows/integration-tests.yml | 635 +++++++++++++----------- 2 files changed, 340 insertions(+), 299 deletions(-) diff --git a/.github/e2e-tests.yml b/.github/e2e-tests.yml index b2c9f12fcaf..faac85c6076 100644 --- a/.github/e2e-tests.yml +++ b/.github/e2e-tests.yml @@ -796,9 +796,9 @@ runner-test-matrix: test_env_type: docker runs_on: ubuntu-latest workflows: - - Run PR E2E Tests + - Run PR E2E Tests 2 - Run Nightly E2E Tests - test_cmd: cd integration-tests/ && go test smoke/runlog_test.go -timeout 30m -count=1 -json + test_cmd: cd integration-tests/ && go test smoke/runlog_test.go -timeout 30m -test.parallel=2 -count=1 -json pyroscope_env: ci-smoke-runlog-evm-simulated - id: integration-tests/smoke/cron_test.go:* diff --git a/.github/workflows/integration-tests.yml b/.github/workflows/integration-tests.yml index fd5784df8c0..6cbc7729697 100644 --- a/.github/workflows/integration-tests.yml +++ b/.github/workflows/integration-tests.yml @@ -4,8 +4,9 @@ on: merge_group: pull_request: push: - tags: - - "*" + # TODO: uncomment when ready + # tags: + # - "*" workflow_dispatch: inputs: cl_ref: @@ -513,9 +514,10 @@ jobs: if: always() uses: smartcontractkit/chainlink-github-actions/chainlink-testing-framework/show-test-summary@70ccaef155381025e411cf7cd1fa5ef8f668ed75 # v2.3.25 - eth-smoke-tests-matrix: + call-run-e2e-tests-workflow: + name: ETH smoke tests if: ${{ !contains(join(github.event.pull_request.labels.*.name, ' '), 'skip-smoke-tests') }} - environment: integration + # environment: integration permissions: actions: read checks: write @@ -523,298 +525,337 @@ jobs: id-token: write contents: read needs: [build-chainlink, changes, build-lint-integration-tests] - env: - SELECTED_NETWORKS: SIMULATED - CHAINLINK_COMMIT_SHA: ${{ inputs.evm-ref || github.sha }} - CHAINLINK_ENV_USER: ${{ github.actor }} - TEST_LOG_LEVEL: debug - strategy: - fail-fast: false - matrix: - product: - - name: runlog - id: runlog - nodes: 2 - os: ubuntu-latest - pyroscope_env: "ci-smoke-runlog-evm-simulated" - - name: cron - id: cron - nodes: 2 - os: ubuntu-latest - pyroscope_env: "ci-smoke-cron-evm-simulated" - - name: flux - id: flux - nodes: 1 - os: ubuntu-latest - pyroscope_env: "ci-smoke-flux-evm-simulated" - - name: ocr - id: ocr - nodes: 2 - os: ubuntu-latest - file: ocr - pyroscope_env: ci-smoke-ocr-evm-simulated - - name: reorg_above_finality - id: reorg_above_finality - nodes: 1 - os: ubuntu-latest - file: reorg_above_finality - pyroscope_env: ci-smoke-reorg-above-finality-evm-simulated - - name: ocr2 - id: ocr2 - nodes: 6 - os: ubuntu22.04-16cores-64GB - file: ocr2 - pyroscope_env: ci-smoke-ocr2-evm-simulated - - name: ocr2 - id: ocr2-plugins - nodes: 6 - os: ubuntu22.04-16cores-64GB - pyroscope_env: ci-smoke-ocr2-plugins-evm-simulated - tag_suffix: "-plugins" - - name: vrf - id: vrf - nodes: 2 - os: ubuntu-latest - pyroscope_env: ci-smoke-vrf-evm-simulated - - name: vrfv2 - id: vrfv2 - nodes: 6 - os: ubuntu-latest - pyroscope_env: ci-smoke-vrf2-evm-simulated - - name: vrfv2plus - id: vrfv2plus - nodes: 9 - os: ubuntu-latest - pyroscope_env: ci-smoke-vrf2plus-evm-simulated - - name: forwarder_ocr - id: forwarder_ocr - nodes: 2 - os: ubuntu-latest - pyroscope_env: ci-smoke-forwarder-ocr-evm-simulated - - name: forwarders_ocr2 - id: forwarders_ocr2 - nodes: 2 - os: ubuntu-latest - pyroscope_env: ci-smoke-forwarder-ocr-evm-simulated - runs-on: ${{ matrix.product.os }} - name: ETH Smoke Tests ${{ matrix.product.name }}${{ matrix.product.tag_suffix }} - steps: - # Handy for debugging resource usage - # - name: Collect Workflow Telemetry - # uses: catchpoint/workflow-telemetry-action@v2 - - name: Collect Metrics - if: needs.changes.outputs.src == 'true' || github.event_name == 'workflow_dispatch' - id: collect-gha-metrics - uses: smartcontractkit/push-gha-metrics-action@d9da21a2747016b3e13de58c7d4115a3d5c97935 # v3.0.1 - with: - id: ${{ env.COLLECTION_ID }}-matrix-${{ matrix.product.id }} - org-id: ${{ secrets.GRAFANA_INTERNAL_TENANT_ID }} - basic-auth: ${{ secrets.GRAFANA_INTERNAL_BASIC_AUTH }} - hostname: ${{ secrets.GRAFANA_INTERNAL_HOST }} - this-job-name: ETH Smoke Tests ${{ matrix.product.name }}${{ matrix.product.tag_suffix }} - test-results-file: '{"testType":"go","filePath":"/tmp/gotest.log"}' - continue-on-error: true - - name: Checkout the repo - uses: actions/checkout@9bb56186c3b09b4f86b1c65136769dd318469633 # v4.1.2 - with: - repository: smartcontractkit/chainlink - ref: ${{ inputs.cl_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.product.run is set, use it for a different command - if [ "${{ matrix.product.run }}" != "" ]; then - echo "run_command=${{ matrix.product.run }} ./smoke/${{ matrix.product.file }}_test.go" >> "$GITHUB_OUTPUT" - else - echo "run_command=./smoke/${{ matrix.product.name }}_test.go" >> "$GITHUB_OUTPUT" - fi - - name: Check for "enable tracing" label - id: check-label - run: | - label=$(jq -r '.pull_request.labels[]?.name // empty' "$GITHUB_EVENT_PATH") + # env: + # SELECTED_NETWORKS: SIMULATED + # CHAINLINK_COMMIT_SHA: ${{ inputs.evm-ref || github.sha }} + # CHAINLINK_ENV_USER: ${{ github.actor }} + # TEST_LOG_LEVEL: debug + uses: ./.github/workflows/run-e2e-tests-reusable-workflow.yml + with: + chainlink_version: ${{ inputs.evm-ref || github.sha }} + test_workflow: Run PR E2E Tests 2 + # slack_notification_after_tests: true + # slack_notification_after_tests_channel_id: "#team-test-tooling-internal" + # slack_notification_after_tests_name: Nightly E2E Tests + secrets: inherit + # QA_AWS_REGION: ${{ secrets.QA_AWS_REGION }} + # QA_AWS_ROLE_TO_ASSUME: ${{ secrets.QA_AWS_ROLE_TO_ASSUME }} + # QA_AWS_ACCOUNT_NUMBER: ${{ secrets.QA_AWS_ACCOUNT_NUMBER }} + # QA_PYROSCOPE_INSTANCE: ${{ secrets.QA_PYROSCOPE_INSTANCE }} + # QA_PYROSCOPE_KEY: ${{ secrets.QA_PYROSCOPE_KEY }} + # QA_KUBECONFIG: ${{ secrets.QA_KUBECONFIG }} + # GRAFANA_INTERNAL_TENANT_ID: ${{ secrets.GRAFANA_INTERNAL_TENANT_ID }} + # GRAFANA_INTERNAL_BASIC_AUTH: ${{ secrets.GRAFANA_INTERNAL_BASIC_AUTH }} + # GRAFANA_INTERNAL_HOST: ${{ secrets.GRAFANA_INTERNAL_HOST }} + # GRAFANA_INTERNAL_URL_SHORTENER_TOKEN: ${{ secrets.GRAFANA_INTERNAL_URL_SHORTENER_TOKEN }} + # GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} + # AWS_REGION: ${{ secrets.QA_AWS_REGION }} + # AWS_OIDC_IAM_ROLE_VALIDATION_PROD_ARN: ${{ secrets.AWS_OIDC_IAM_ROLE_VALIDATION_PROD_ARN }} + # AWS_API_GW_HOST_GRAFANA: ${{ secrets.AWS_API_GW_HOST_GRAFANA }} + # SLACK_BOT_TOKEN: ${{ secrets.QA_SLACK_API_KEY }} + + # eth-smoke-tests-matrix: + # if: ${{ !contains(join(github.event.pull_request.labels.*.name, ' '), 'skip-smoke-tests') }} + # environment: integration + # permissions: + # actions: read + # checks: write + # pull-requests: write + # id-token: write + # contents: read + # needs: [build-chainlink, changes, build-lint-integration-tests] + # env: + # SELECTED_NETWORKS: SIMULATED + # CHAINLINK_COMMIT_SHA: ${{ inputs.evm-ref || github.sha }} + # CHAINLINK_ENV_USER: ${{ github.actor }} + # TEST_LOG_LEVEL: debug + # strategy: + # fail-fast: false + # matrix: + # product: + # - name: runlog + # id: runlog + # nodes: 2 + # os: ubuntu-latest + # pyroscope_env: "ci-smoke-runlog-evm-simulated" + # - name: cron + # id: cron + # nodes: 2 + # os: ubuntu-latest + # pyroscope_env: "ci-smoke-cron-evm-simulated" + # - name: flux + # id: flux + # nodes: 1 + # os: ubuntu-latest + # pyroscope_env: "ci-smoke-flux-evm-simulated" + # - name: ocr + # id: ocr + # nodes: 2 + # os: ubuntu-latest + # file: ocr + # pyroscope_env: ci-smoke-ocr-evm-simulated + # - name: reorg_above_finality + # id: reorg_above_finality + # nodes: 1 + # os: ubuntu-latest + # file: reorg_above_finality + # pyroscope_env: ci-smoke-reorg-above-finality-evm-simulated + # - name: ocr2 + # id: ocr2 + # nodes: 6 + # os: ubuntu22.04-16cores-64GB + # file: ocr2 + # pyroscope_env: ci-smoke-ocr2-evm-simulated + # - name: ocr2 + # id: ocr2-plugins + # nodes: 6 + # os: ubuntu22.04-16cores-64GB + # pyroscope_env: ci-smoke-ocr2-plugins-evm-simulated + # tag_suffix: "-plugins" + # - name: vrf + # id: vrf + # nodes: 2 + # os: ubuntu-latest + # pyroscope_env: ci-smoke-vrf-evm-simulated + # - name: vrfv2 + # id: vrfv2 + # nodes: 6 + # os: ubuntu-latest + # pyroscope_env: ci-smoke-vrf2-evm-simulated + # - name: vrfv2plus + # id: vrfv2plus + # nodes: 9 + # os: ubuntu-latest + # pyroscope_env: ci-smoke-vrf2plus-evm-simulated + # - name: forwarder_ocr + # id: forwarder_ocr + # nodes: 2 + # os: ubuntu-latest + # pyroscope_env: ci-smoke-forwarder-ocr-evm-simulated + # - name: forwarders_ocr2 + # id: forwarders_ocr2 + # nodes: 2 + # os: ubuntu-latest + # pyroscope_env: ci-smoke-forwarder-ocr-evm-simulated + # runs-on: ${{ matrix.product.os }} + # name: ETH Smoke Tests ${{ matrix.product.name }}${{ matrix.product.tag_suffix }} + # steps: + # # Handy for debugging resource usage + # # - name: Collect Workflow Telemetry + # # uses: catchpoint/workflow-telemetry-action@v2 + # - name: Collect Metrics + # if: needs.changes.outputs.src == 'true' || github.event_name == 'workflow_dispatch' + # id: collect-gha-metrics + # uses: smartcontractkit/push-gha-metrics-action@d9da21a2747016b3e13de58c7d4115a3d5c97935 # v3.0.1 + # with: + # id: ${{ env.COLLECTION_ID }}-matrix-${{ matrix.product.id }} + # org-id: ${{ secrets.GRAFANA_INTERNAL_TENANT_ID }} + # basic-auth: ${{ secrets.GRAFANA_INTERNAL_BASIC_AUTH }} + # hostname: ${{ secrets.GRAFANA_INTERNAL_HOST }} + # this-job-name: ETH Smoke Tests ${{ matrix.product.name }}${{ matrix.product.tag_suffix }} + # test-results-file: '{"testType":"go","filePath":"/tmp/gotest.log"}' + # continue-on-error: true + # - name: Checkout the repo + # uses: actions/checkout@9bb56186c3b09b4f86b1c65136769dd318469633 # v4.1.2 + # with: + # repository: smartcontractkit/chainlink + # ref: ${{ inputs.cl_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.product.run is set, use it for a different command + # if [ "${{ matrix.product.run }}" != "" ]; then + # echo "run_command=${{ matrix.product.run }} ./smoke/${{ matrix.product.file }}_test.go" >> "$GITHUB_OUTPUT" + # else + # echo "run_command=./smoke/${{ matrix.product.name }}_test.go" >> "$GITHUB_OUTPUT" + # fi + # - name: Check for "enable tracing" label + # id: check-label + # run: | + # label=$(jq -r '.pull_request.labels[]?.name // empty' "$GITHUB_EVENT_PATH") - if [[ -n "$label" ]]; then - if [[ "$label" == "enable tracing" ]]; then - echo "Enable tracing label found." - echo "trace=true" >> $GITHUB_OUTPUT - else - echo "Enable tracing label not found." - echo "trace=false" >> $GITHUB_OUTPUT - fi - else - echo "No labels present or labels are null." - echo "trace=false" >> $GITHUB_OUTPUT - fi + # if [[ -n "$label" ]]; then + # if [[ "$label" == "enable tracing" ]]; then + # echo "Enable tracing label found." + # echo "trace=true" >> $GITHUB_OUTPUT + # else + # echo "Enable tracing label not found." + # echo "trace=false" >> $GITHUB_OUTPUT + # fi + # else + # echo "No labels present or labels are null." + # echo "trace=false" >> $GITHUB_OUTPUT + # fi - - name: Setup Grafana and OpenTelemetry - id: docker-setup - if: steps.check-label.outputs.trace == 'true' && matrix.product.name == 'ocr2' && matrix.product.tag_suffix == '-plugins' - run: | - # Create network - docker network create --driver bridge tracing + # - name: Setup Grafana and OpenTelemetry + # id: docker-setup + # if: steps.check-label.outputs.trace == 'true' && matrix.product.name == 'ocr2' && matrix.product.tag_suffix == '-plugins' + # run: | + # # Create network + # docker network create --driver bridge tracing - # Make trace directory - cd integration-tests/smoke/ - mkdir ./traces - chmod -R 777 ./traces + # # Make trace directory + # cd integration-tests/smoke/ + # mkdir ./traces + # chmod -R 777 ./traces - # Switch directory - cd ../../.github/tracing + # # Switch directory + # cd ../../.github/tracing - # Create a Docker volume for traces - # docker volume create otel-traces + # # Create a Docker volume for traces + # # docker volume create otel-traces - # Start OpenTelemetry Collector - # Note the user must be set to the same user as the runner for the trace data to be accessible - docker run -d --network=tracing --name=otel-collector \ - -v $PWD/otel-collector-ci.yaml:/etc/otel-collector.yaml \ - -v $PWD/../../integration-tests/smoke/traces:/tracing \ - --user "$(id -u):$(id -g)" \ - -p 4317:4317 otel/opentelemetry-collector:0.88.0 --config=/etc/otel-collector.yaml + # # Start OpenTelemetry Collector + # # Note the user must be set to the same user as the runner for the trace data to be accessible + # docker run -d --network=tracing --name=otel-collector \ + # -v $PWD/otel-collector-ci.yaml:/etc/otel-collector.yaml \ + # -v $PWD/../../integration-tests/smoke/traces:/tracing \ + # --user "$(id -u):$(id -g)" \ + # -p 4317:4317 otel/opentelemetry-collector:0.88.0 --config=/etc/otel-collector.yaml - - name: Locate Docker Volume - id: locate-volume - if: false - run: | - echo "VOLUME_PATH=$(docker volume inspect --format '{{ .Mountpoint }}' otel-traces)" >> $GITHUB_OUTPUT + # - name: Locate Docker Volume + # id: locate-volume + # if: false + # run: | + # echo "VOLUME_PATH=$(docker volume inspect --format '{{ .Mountpoint }}' otel-traces)" >> $GITHUB_OUTPUT - - name: Show Otel-Collector Logs - if: steps.check-label.outputs.trace == 'true' && matrix.product.name == 'ocr2' && matrix.product.tag_suffix == '-plugins' - run: | - docker logs otel-collector + # - name: Show Otel-Collector Logs + # if: steps.check-label.outputs.trace == 'true' && matrix.product.name == 'ocr2' && matrix.product.tag_suffix == '-plugins' + # run: | + # docker logs otel-collector - - name: Setup GAP for Grafana - uses: smartcontractkit/.github/actions/setup-gap@d316f66b2990ea4daa479daa3de6fc92b00f863e # setup-gap@0.3.2 - id: setup-gap - with: - # aws inputs - aws-region: ${{ secrets.AWS_REGION }} - aws-role-arn: ${{ secrets.AWS_OIDC_IAM_ROLE_VALIDATION_PROD_ARN }} - api-gateway-host: ${{ secrets.AWS_API_GW_HOST_GRAFANA }} - # other inputs - duplicate-authorization-header: "true" + # - name: Setup GAP for Grafana + # uses: smartcontractkit/.github/actions/setup-gap@d316f66b2990ea4daa479daa3de6fc92b00f863e # setup-gap@0.3.2 + # id: setup-gap + # with: + # # aws inputs + # aws-region: ${{ secrets.AWS_REGION }} + # aws-role-arn: ${{ secrets.AWS_OIDC_IAM_ROLE_VALIDATION_PROD_ARN }} + # api-gateway-host: ${{ secrets.AWS_API_GW_HOST_GRAFANA }} + # # other inputs + # duplicate-authorization-header: "true" - ## Run this step when changes that require tests to be run are made - - name: Run Tests - if: needs.changes.outputs.src == 'true' || github.event_name == 'workflow_dispatch' - uses: smartcontractkit/chainlink-github-actions/chainlink-testing-framework/run-tests@aa8eea635029ab8d95abd3c206f56dae1e22e623 # v2.3.28 - with: - test_command_to_run: cd ./integration-tests && go test -timeout 30m -count=1 -json -test.parallel=${{ matrix.product.nodes }} ${{ steps.build-go-test-command.outputs.run_command }} 2>&1 | tee /tmp/gotest.log | gotestloghelper -ci -singlepackage -hidepassingtests=false -hidepassinglogs - test_download_vendor_packages_command: cd ./integration-tests && go mod download - test_config_chainlink_version: ${{ inputs.evm-ref || github.sha }} - test_config_selected_networks: ${{ env.SELECTED_NETWORKS }} - test_config_logging_run_id: ${{ github.run_id }} - test_config_logstream_log_targets: ${{ vars.LOGSTREAM_LOG_TARGETS }} - test_config_test_log_collect: ${{ vars.TEST_LOG_COLLECT }} - cl_repo: ${{ env.CHAINLINK_IMAGE }} - cl_image_tag: ${{ inputs.evm-ref || github.sha }}${{ matrix.product.tag_suffix }} - aws_registries: ${{ secrets.QA_AWS_ACCOUNT_NUMBER }} - artifacts_name: ${{ matrix.product.name }}${{ matrix.product.tag_suffix }}-test-artifacts - artifacts_location: | - ./integration-tests/smoke/logs/ - ./integration-tests/smoke/db_dumps/ - ./integration-tests/smoke/seth_artifacts/ - /tmp/gotest.log - publish_check_name: ${{ matrix.product.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" - go_coverage_src_dir: /var/tmp/go-coverage - go_coverage_dest_dir: ${{ github.workspace }}/.covdata - DEFAULT_CHAINLINK_IMAGE: ${{ env.CHAINLINK_IMAGE }} - DEFAULT_LOKI_TENANT_ID: ${{ secrets.GRAFANA_INTERNAL_TENANT_ID }} - DEFAULT_LOKI_ENDPOINT: https://${{ secrets.GRAFANA_INTERNAL_HOST }}/loki/api/v1/push - DEFAULT_LOKI_BASIC_AUTH: ${{ secrets.GRAFANA_INTERNAL_BASIC_AUTH }} - DEFAULT_GRAFANA_BASE_URL: "http://localhost:8080/primary" - DEFAULT_GRAFANA_DASHBOARD_URL: "/d/ddf75041-1e39-42af-aa46-361fe4c36e9e/ci-e2e-tests-logs" - DEFAULT_GRAFANA_BEARER_TOKEN: ${{ secrets.GRAFANA_INTERNAL_URL_SHORTENER_TOKEN }} - DEFAULT_PYROSCOPE_SERVER_URL: ${{ matrix.product.pyroscope_env == '' && '' || !startsWith(github.ref, 'refs/tags/') && '' || secrets.QA_PYROSCOPE_INSTANCE }} # Avoid sending blank envs https://github.com/orgs/community/discussions/25725 - DEFAULT_PYROSCOPE_KEY: ${{ secrets.QA_PYROSCOPE_KEY }} - DEFAULT_PYROSCOPE_ENVIRONMENT: ${{ matrix.product.pyroscope_env }} - DEFAULT_PYROSCOPE_ENABLED: ${{ matrix.product.pyroscope_env == '' || !startsWith(github.ref, 'refs/tags/') && 'false' || 'true' }} + # ## Run this step when changes that require tests to be run are made + # - name: Run Tests + # if: needs.changes.outputs.src == 'true' || github.event_name == 'workflow_dispatch' + # uses: smartcontractkit/chainlink-github-actions/chainlink-testing-framework/run-tests@aa8eea635029ab8d95abd3c206f56dae1e22e623 # v2.3.28 + # with: + # test_command_to_run: cd ./integration-tests && go test -timeout 30m -count=1 -json -test.parallel=${{ matrix.product.nodes }} ${{ steps.build-go-test-command.outputs.run_command }} 2>&1 | tee /tmp/gotest.log | gotestloghelper -ci -singlepackage -hidepassingtests=false -hidepassinglogs + # test_download_vendor_packages_command: cd ./integration-tests && go mod download + # test_config_chainlink_version: ${{ inputs.evm-ref || github.sha }} + # test_config_selected_networks: ${{ env.SELECTED_NETWORKS }} + # test_config_logging_run_id: ${{ github.run_id }} + # test_config_logstream_log_targets: ${{ vars.LOGSTREAM_LOG_TARGETS }} + # test_config_test_log_collect: ${{ vars.TEST_LOG_COLLECT }} + # cl_repo: ${{ env.CHAINLINK_IMAGE }} + # cl_image_tag: ${{ inputs.evm-ref || github.sha }}${{ matrix.product.tag_suffix }} + # aws_registries: ${{ secrets.QA_AWS_ACCOUNT_NUMBER }} + # artifacts_name: ${{ matrix.product.name }}${{ matrix.product.tag_suffix }}-test-artifacts + # artifacts_location: | + # ./integration-tests/smoke/logs/ + # ./integration-tests/smoke/db_dumps/ + # ./integration-tests/smoke/seth_artifacts/ + # /tmp/gotest.log + # publish_check_name: ${{ matrix.product.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" + # go_coverage_src_dir: /var/tmp/go-coverage + # go_coverage_dest_dir: ${{ github.workspace }}/.covdata + # DEFAULT_CHAINLINK_IMAGE: ${{ env.CHAINLINK_IMAGE }} + # DEFAULT_LOKI_TENANT_ID: ${{ secrets.GRAFANA_INTERNAL_TENANT_ID }} + # DEFAULT_LOKI_ENDPOINT: https://${{ secrets.GRAFANA_INTERNAL_HOST }}/loki/api/v1/push + # DEFAULT_LOKI_BASIC_AUTH: ${{ secrets.GRAFANA_INTERNAL_BASIC_AUTH }} + # DEFAULT_GRAFANA_BASE_URL: "http://localhost:8080/primary" + # DEFAULT_GRAFANA_DASHBOARD_URL: "/d/ddf75041-1e39-42af-aa46-361fe4c36e9e/ci-e2e-tests-logs" + # DEFAULT_GRAFANA_BEARER_TOKEN: ${{ secrets.GRAFANA_INTERNAL_URL_SHORTENER_TOKEN }} + # DEFAULT_PYROSCOPE_SERVER_URL: ${{ matrix.product.pyroscope_env == '' && '' || !startsWith(github.ref, 'refs/tags/') && '' || secrets.QA_PYROSCOPE_INSTANCE }} # Avoid sending blank envs https://github.com/orgs/community/discussions/25725 + # DEFAULT_PYROSCOPE_KEY: ${{ secrets.QA_PYROSCOPE_KEY }} + # DEFAULT_PYROSCOPE_ENVIRONMENT: ${{ matrix.product.pyroscope_env }} + # DEFAULT_PYROSCOPE_ENABLED: ${{ matrix.product.pyroscope_env == '' || !startsWith(github.ref, 'refs/tags/') && 'false' || 'true' }} - - name: Upload Coverage Data - uses: actions/upload-artifact@65462800fd760344b1a7b4382951275a0abb4808 # v4.3.3 - timeout-minutes: 2 - continue-on-error: true - with: - name: cl-node-coverage-data-${{ matrix.product.name }}-${{ matrix.product.tag_suffix }} - path: .covdata - retention-days: 1 + # - name: Upload Coverage Data + # uses: actions/upload-artifact@65462800fd760344b1a7b4382951275a0abb4808 # v4.3.3 + # timeout-minutes: 2 + # continue-on-error: true + # with: + # name: cl-node-coverage-data-${{ matrix.product.name }}-${{ matrix.product.tag_suffix }} + # path: .covdata + # retention-days: 1 - # Run this step when changes that do not need the test to run are made - - name: Run Setup - if: needs.changes.outputs.src == 'false' - uses: smartcontractkit/chainlink-github-actions/chainlink-testing-framework/setup-run-tests-environment@75a9005952a9e905649cfb5a6971fd9429436acd # v2.3.25 - with: - test_download_vendor_packages_command: cd ./integration-tests && go mod download - 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" + # # Run this step when changes that do not need the test to run are made + # - name: Run Setup + # if: needs.changes.outputs.src == 'false' + # uses: smartcontractkit/chainlink-github-actions/chainlink-testing-framework/setup-run-tests-environment@75a9005952a9e905649cfb5a6971fd9429436acd # v2.3.25 + # with: + # test_download_vendor_packages_command: cd ./integration-tests && go mod download + # 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: Show Otel-Collector Logs - if: steps.check-label.outputs.trace == 'true' && matrix.product.name == 'ocr2' && matrix.product.tag_suffix == '-plugins' - run: | - docker logs otel-collector + # - name: Show Otel-Collector Logs + # if: steps.check-label.outputs.trace == 'true' && matrix.product.name == 'ocr2' && matrix.product.tag_suffix == '-plugins' + # run: | + # docker logs otel-collector - - name: Permissions on traces - if: steps.check-label.outputs.trace == 'true' && matrix.product.name == 'ocr2' && matrix.product.tag_suffix == '-plugins' - run: | - ls -l ./integration-tests/smoke/traces + # - name: Permissions on traces + # if: steps.check-label.outputs.trace == 'true' && matrix.product.name == 'ocr2' && matrix.product.tag_suffix == '-plugins' + # run: | + # ls -l ./integration-tests/smoke/traces - - name: Upload Trace Data - if: steps.check-label.outputs.trace == 'true' && matrix.product.name == 'ocr2' && matrix.product.tag_suffix == '-plugins' - uses: actions/upload-artifact@5d5d22a31266ced268874388b861e4b58bb5c2f3 # v4.3.1 - with: - name: trace-data - path: ./integration-tests/smoke/traces/trace-data.json + # - name: Upload Trace Data + # if: steps.check-label.outputs.trace == 'true' && matrix.product.name == 'ocr2' && matrix.product.tag_suffix == '-plugins' + # uses: actions/upload-artifact@5d5d22a31266ced268874388b861e4b58bb5c2f3 # v4.3.1 + # with: + # name: trace-data + # path: ./integration-tests/smoke/traces/trace-data.json - - name: Print failed test summary - if: always() - uses: smartcontractkit/chainlink-github-actions/chainlink-testing-framework/show-test-summary@70ccaef155381025e411cf7cd1fa5ef8f668ed75 # v2.3.25 - with: - test_directories: ./integration-tests/smoke/ + # - name: Print failed test summary + # if: always() + # uses: smartcontractkit/chainlink-github-actions/chainlink-testing-framework/show-test-summary@70ccaef155381025e411cf7cd1fa5ef8f668ed75 # v2.3.25 + # with: + # test_directories: ./integration-tests/smoke/ ### Used to check the required checks box when the matrix completes - eth-smoke-tests: - if: always() - runs-on: ubuntu-latest - name: ETH Smoke Tests - needs: [eth-smoke-tests-matrix, eth-smoke-tests-matrix-automation, eth-smoke-tests-matrix-log-poller] - steps: - - name: Check smoke test matrix status - if: needs.eth-smoke-tests-matrix.result != 'success' || needs.eth-smoke-tests-matrix-automation.result != 'success' || needs.eth-smoke-tests-matrix-log-poller.result != 'success' - run: | - echo "ETH Smoke Tests: ${{ needs.eth-smoke-tests-matrix.result }}" - echo "Automation: ${{ needs.eth-smoke-tests-matrix-automation.result }}" - echo "Log Poller: ${{ needs.eth-smoke-tests-matrix-log-poller.result }}" - exit 1 - - name: Collect Metrics - if: always() - id: collect-gha-metrics - uses: smartcontractkit/push-gha-metrics-action@d9da21a2747016b3e13de58c7d4115a3d5c97935 # v3.0.1 - with: - id: ${{ env.COLLECTION_ID }}-matrix-results - org-id: ${{ secrets.GRAFANA_INTERNAL_TENANT_ID }} - basic-auth: ${{ secrets.GRAFANA_INTERNAL_BASIC_AUTH }} - hostname: ${{ secrets.GRAFANA_INTERNAL_HOST }} - this-job-name: ETH Smoke Tests - matrix-aggregator-status: ${{ needs.eth-smoke-tests-matrix.result }} - continue-on-error: true + # eth-smoke-tests: + # if: always() + # runs-on: ubuntu-latest + # name: ETH Smoke Tests + # needs: [eth-smoke-tests-matrix, eth-smoke-tests-matrix-automation, eth-smoke-tests-matrix-log-poller] + # steps: + # - name: Check smoke test matrix status + # if: needs.eth-smoke-tests-matrix.result != 'success' || needs.eth-smoke-tests-matrix-automation.result != 'success' || needs.eth-smoke-tests-matrix-log-poller.result != 'success' + # run: | + # echo "ETH Smoke Tests: ${{ needs.eth-smoke-tests-matrix.result }}" + # echo "Automation: ${{ needs.eth-smoke-tests-matrix-automation.result }}" + # echo "Log Poller: ${{ needs.eth-smoke-tests-matrix-log-poller.result }}" + # exit 1 + # - name: Collect Metrics + # if: always() + # id: collect-gha-metrics + # uses: smartcontractkit/push-gha-metrics-action@d9da21a2747016b3e13de58c7d4115a3d5c97935 # v3.0.1 + # with: + # id: ${{ env.COLLECTION_ID }}-matrix-results + # org-id: ${{ secrets.GRAFANA_INTERNAL_TENANT_ID }} + # basic-auth: ${{ secrets.GRAFANA_INTERNAL_BASIC_AUTH }} + # hostname: ${{ secrets.GRAFANA_INTERNAL_HOST }} + # this-job-name: ETH Smoke Tests + # matrix-aggregator-status: ${{ needs.eth-smoke-tests-matrix.result }} + # continue-on-error: true cleanup: name: Clean up integration environment deployments if: always() - needs: [eth-smoke-tests] + needs: [call-run-e2e-tests-workflow] runs-on: ubuntu-latest steps: - name: Checkout repo @@ -865,29 +906,29 @@ jobs: # Run the setup if the matrix finishes but this time save the cache if we have a cache hit miss # this will also only run if both of the matrix jobs pass - eth-smoke-go-mod-cache: - environment: integration - needs: [eth-smoke-tests] - runs-on: ubuntu-latest - name: ETH Smoke Tests Go Mod Cache - continue-on-error: true - steps: - - name: Checkout the repo - uses: actions/checkout@9bb56186c3b09b4f86b1c65136769dd318469633 # v4.1.2 - with: - repository: smartcontractkit/chainlink - ref: ${{ inputs.cl_ref || github.event.pull_request.head.sha || github.event.merge_group.head_sha }} - - name: Run Setup - uses: smartcontractkit/chainlink-github-actions/chainlink-testing-framework/setup-go@75a9005952a9e905649cfb5a6971fd9429436acd # v2.3.25 - with: - test_download_vendor_packages_command: | - cd ./integration-tests - go mod download - # force download of test dependencies - go test -run=NonExistentTest ./smoke/... || echo "ignore expected test failure" - go_mod_path: ./integration-tests/go.mod - cache_key_id: core-e2e-${{ env.MOD_CACHE_VERSION }} - cache_restore_only: "false" + # eth-smoke-go-mod-cache: + # environment: integration + # needs: [eth-smoke-tests] + # runs-on: ubuntu-latest + # name: ETH Smoke Tests Go Mod Cache + # continue-on-error: true + # steps: + # - name: Checkout the repo + # uses: actions/checkout@9bb56186c3b09b4f86b1c65136769dd318469633 # v4.1.2 + # with: + # repository: smartcontractkit/chainlink + # ref: ${{ inputs.cl_ref || github.event.pull_request.head.sha || github.event.merge_group.head_sha }} + # - name: Run Setup + # uses: smartcontractkit/chainlink-github-actions/chainlink-testing-framework/setup-go@75a9005952a9e905649cfb5a6971fd9429436acd # v2.3.25 + # with: + # test_download_vendor_packages_command: | + # cd ./integration-tests + # go mod download + # # force download of test dependencies + # go test -run=NonExistentTest ./smoke/... || echo "ignore expected test failure" + # go_mod_path: ./integration-tests/go.mod + # cache_key_id: core-e2e-${{ env.MOD_CACHE_VERSION }} + # cache_restore_only: "false" ### Migration tests node-migration-tests: