Skip to content

Commit e4caf9d

Browse files
authored
[DX-361] Prepare to Move E2E Tests to After Merge (#17155)
* E2E tests after merge * Try out post-merge flow
1 parent 6433932 commit e4caf9d

File tree

1 file changed

+33
-12
lines changed

1 file changed

+33
-12
lines changed

.github/workflows/integration-tests.yml

Lines changed: 33 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,8 @@ on:
88
push:
99
tags:
1010
- "*"
11+
branches:
12+
- develop
1113
workflow_dispatch:
1214
inputs:
1315
cl_ref:
@@ -118,8 +120,8 @@ jobs:
118120
ccip_changes:
119121
- '**/*ccip*'
120122
- '**/*ccip*/**'
121-
- name: Ignore Filter On Workflow Dispatch
122-
if: ${{ github.event_name == 'workflow_dispatch' }}
123+
- name: Ignore Filter On Workflow Dispatch or PR Label
124+
if: ${{ (github.event_name == 'pull_request' && contains(github.event.pull_request.labels.*.name, 'run-e2e')) || github.event_name == 'workflow_dispatch' }}
123125
id: ignore-filter
124126
run: echo "changes=true" >> $GITHUB_OUTPUT
125127
outputs:
@@ -431,15 +433,6 @@ jobs:
431433
echo "CCIP tests were skipped."
432434
fi
433435
434-
- name: Send slack notification for failed migration tests
435-
if: steps.check_core_results.outputs.node_migration_tests_failed == 'true' && github.event_name != 'workflow_dispatch'
436-
uses: slackapi/slack-github-action@6c661ce58804a1a20f6dc5fbee7f0381b469e001 # v1.25.0
437-
env:
438-
SLACK_BOT_TOKEN: ${{ secrets.QA_SLACK_API_KEY }}
439-
with:
440-
channel-id: "#team-test-tooling-internal"
441-
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) }}"
442-
443436
- name: Fail the job if core tests in PR not successful
444437
if: always() && needs.run-core-e2e-tests-for-pr.result == 'failure'
445438
run: exit 1
@@ -668,7 +661,6 @@ jobs:
668661
if: needs.changes.outputs.core_changes == 'false' || needs.solana-test-image-exists.outputs.exists == 'true'
669662

670663
solana-smoke-tests:
671-
if: ${{ !contains(join(github.event.pull_request.labels.*.name, ' '), 'skip-smoke-tests') }}
672664
environment: integration
673665
permissions:
674666
checks: write
@@ -794,3 +786,32 @@ jobs:
794786
path: .covdata
795787
retention-days: 1
796788

789+
# TODO: Use other Slack Channel for this notification
790+
notify-test-failure:
791+
name: Notify Test Failure
792+
if: ${{ github.ref == 'refs/heads/develop' && failure() }}
793+
needs: [check-e2e-test-results, solana-smoke-tests]
794+
runs-on: ubuntu-latest
795+
steps:
796+
- name: Send slack notification for failed migration tests
797+
uses: slackapi/slack-github-action@485a9d42d3a73031f12ec201c457e2162c45d02d # v2.0.0
798+
with:
799+
method: chat.postMessage
800+
token: ${{ secrets.QA_SLACK_API_KEY }}
801+
payload: |
802+
channel: "C08FN09RS80"
803+
text: "E2E Tests Failed Post-Merge, Immediate Action Required"
804+
blocks: |
805+
- type: section
806+
text:
807+
type: mrkdwn
808+
text: "*:rotating_light: E2E Tests Failed Post-Merge, Immediate Action Required :rotating_light:*"
809+
- type: section
810+
text:
811+
type: mrkdwn
812+
text: "Alerting @devex-cicd-oncall, E2E tests failed for commit <${{ github.server_url }}/${{ github.repository }}/commit/${{ github.sha }}|${{ github.sha }}> on run ID <${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}|${{ github.run_id }}>. This commit was already merged to develop by user ${{ github.actor }}. Please follow instructions below to remedy the issue."
813+
- type: divider
814+
- type: section
815+
text:
816+
type: mrkdwn
817+
text: "1. Use the `/gh-lookup ${{ github.actor }}` command to find the who made the commit.\n2. <https://smartcontract-it.atlassian.net/wiki/spaces/ENG/pages/597262421/Raising+an+Incident|Raise a Pager Duty Incident> with that engineer to fix the issue.\n3. Start a 1 hour timer. If the E2E tests cannot be made passing on `develop` branch by then, please use `git revert <last-green-commit>` to revert the `develop` branch back to a happy state.\n4. Write a quick summary of the actions taken and post it in a thread to this message."

0 commit comments

Comments
 (0)