Skip to content

Commit

Permalink
Run selected e2e tests in merge queue
Browse files Browse the repository at this point in the history
  • Loading branch information
lukaszcl committed Sep 19, 2024
1 parent ddc0111 commit a1d0884
Show file tree
Hide file tree
Showing 2 changed files with 56 additions and 11 deletions.
3 changes: 2 additions & 1 deletion .github/e2e-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -338,6 +338,7 @@ runner-test-matrix:
runs_on: ubuntu-latest
workflows:
- PR E2E Core Tests
- Merge Queue E2E Core Tests
- Nightly E2E Tests
test_cmd: cd integration-tests/smoke && go test -test.run ^TestUpdateCheckData$ -test.parallel=3 -timeout 30m -count=1 -json
pyroscope_env: ci-smoke-automation-evm-simulated
Expand All @@ -357,7 +358,7 @@ runner-test-matrix:
test_env_type: docker
runs_on: ubuntu-latest
workflows:
- PR E2E Core Tests
- Merge Queue E2E Core Tests
- Nightly E2E Tests
test_cmd: cd integration-tests/smoke && go test -test.run ^TestKeeperBasicSmoke$ -test.parallel=3 -timeout 30m -count=1 -json
pyroscope_env: ci-smoke-keeper-evm-simulated
Expand Down
64 changes: 54 additions & 10 deletions .github/workflows/integration-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -232,7 +232,7 @@ jobs:
AWS_ROLE_TO_ASSUME: ${{ secrets.QA_AWS_ROLE_TO_ASSUME }}
dep_evm_sha: ${{ inputs.evm-ref }}

run-core-e2e-tests-workflow:
run-core-e2e-tests-in-pr:
name: Run Core E2E Tests
permissions:
actions: read
Expand Down Expand Up @@ -271,7 +271,47 @@ jobs:
AWS_API_GW_HOST_GRAFANA: ${{ secrets.AWS_API_GW_HOST_GRAFANA }}
SLACK_BOT_TOKEN: ${{ secrets.QA_SLACK_API_KEY }}

run-ccip-e2e-tests-workflow:
run-core-e2e-tests-in-merge-queue:
name: Run Core E2E Tests
permissions:
actions: read
checks: write
pull-requests: write
id-token: write
contents: read
needs: [build-chainlink, changes]
# Enable when done debugging
# if: ${{ github.event_name == 'merge_group' }}
uses: ./.github/workflows/run-e2e-tests-reusable-workflow.yml
with:
workflow_name: Run Core E2E Tests
chainlink_version: ${{ inputs.evm-ref || github.sha }}
chainlink_upgrade_version: ${{ github.sha }}
test_workflow: Merge Queue E2E Core Tests
upload_cl_node_coverage_artifact: true
upload_cl_node_coverage_artifact_prefix: cl_node_coverage_data_
enable_otel_traces_for_ocr2_plugins: ${{ contains(join(github.event.pull_request.labels.*.name, ' '), 'enable tracing') }}
secrets:
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 }}
LOKI_TENANT_ID: ${{ secrets.LOKI_TENANT_ID }}
LOKI_URL: ${{ secrets.LOKI_URL }}
LOKI_BASIC_AUTH: ${{ secrets.LOKI_BASIC_AUTH }}
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 }}

run-ccip-e2e-tests-in-pr:
name: Run CCIP E2E Tests
permissions:
actions: read
Expand Down Expand Up @@ -314,12 +354,12 @@ jobs:
if: always()
name: ETH Smoke Tests
runs-on: ubuntu-latest
needs: [lint-integration-tests, run-core-e2e-tests-workflow, run-ccip-e2e-tests-workflow]
needs: [lint-integration-tests, run-core-e2e-tests-in-pr, run-ccip-e2e-tests-in-pr, run-core-e2e-tests-in-merge-queue]
steps:
- name: Check Core test results
id: check_core_results
run: |
results='${{ needs.run-core-e2e-tests-workflow.outputs.test_results }}'
results='${{ needs.run-core-e2e-tests-in-pr.outputs.test_results }}'
echo "Core test results:"
echo "$results" | jq .
Expand All @@ -329,8 +369,8 @@ jobs:
- name: Check CCIP test results
id: check_ccip_results
run: |
if [[ '${{ needs.run-ccip-e2e-tests-workflow.result }}' != 'skipped' ]]; then
results='${{ needs.run-ccip-e2e-tests-workflow.outputs.test_results }}'
if [[ '${{ needs.run-ccip-e2e-tests-in-pr.result }}' != 'skipped' ]]; then
results='${{ needs.run-ccip-e2e-tests-in-pr.outputs.test_results }}'
echo "CCIP test results:"
echo "$results" | jq .
else
Expand All @@ -346,18 +386,22 @@ jobs:
channel-id: "#team-test-tooling-internal"
slack-message: ":x: :mild-panic-intensifies: Node Migration Tests Failed: \n${{ format('https://github.com/{0}/actions/runs/{1}', github.repository, github.run_id) }}\n${{ format('Notifying <!subteam^{0}|{0}>', secrets.GUARDIAN_SLACK_NOTIFICATION_HANDLE) }}"

- name: Fail the job if core tests not successful
if: always() && needs.run-core-e2e-tests-workflow.result == 'failure'
- name: Fail the job if core tests in PR not successful
if: always() && needs.run-core-e2e-tests-in-pr.result == 'failure'
run: exit 1

- name: Fail the job if core tests in merge queue not successful
if: always() && needs.run-core-e2e-tests-in-merge-queue.result == 'failure'
run: exit 1

- name: Fail the job if lint not successful
if: always() && needs.lint-integration-tests.result == 'failure'
run: exit 1

cleanup:
name: Clean up integration environment deployments
if: always()
needs: [run-core-e2e-tests-workflow, run-ccip-e2e-tests-workflow]
needs: [run-core-e2e-tests-in-pr, run-ccip-e2e-tests-in-pr, run-core-e2e-tests-in-merge-queue]
runs-on: ubuntu-latest
steps:
- name: Checkout repo
Expand Down Expand Up @@ -389,7 +433,7 @@ jobs:
show-chainlink-node-coverage:
name: Show Chainlink Node Go Coverage
if: always()
needs: [run-core-e2e-tests-workflow, run-ccip-e2e-tests-workflow]
needs: [run-core-e2e-tests-in-pr, run-ccip-e2e-tests-in-pr, run-core-e2e-tests-in-merge-queue]
runs-on: ubuntu-latest
steps:
- name: Checkout the repo
Expand Down

0 comments on commit a1d0884

Please sign in to comment.