|
8 | 8 | push: |
9 | 9 | tags: |
10 | 10 | - "*" |
| 11 | + branches: |
| 12 | + - develop |
11 | 13 | workflow_dispatch: |
12 | 14 | inputs: |
13 | 15 | cl_ref: |
@@ -118,8 +120,8 @@ jobs: |
118 | 120 | ccip_changes: |
119 | 121 | - '**/*ccip*' |
120 | 122 | - '**/*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' }} |
123 | 125 | id: ignore-filter |
124 | 126 | run: echo "changes=true" >> $GITHUB_OUTPUT |
125 | 127 | outputs: |
@@ -431,15 +433,6 @@ jobs: |
431 | 433 | echo "CCIP tests were skipped." |
432 | 434 | fi |
433 | 435 |
|
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 | | - |
443 | 436 | - name: Fail the job if core tests in PR not successful |
444 | 437 | if: always() && needs.run-core-e2e-tests-for-pr.result == 'failure' |
445 | 438 | run: exit 1 |
@@ -668,7 +661,6 @@ jobs: |
668 | 661 | if: needs.changes.outputs.core_changes == 'false' || needs.solana-test-image-exists.outputs.exists == 'true' |
669 | 662 |
|
670 | 663 | solana-smoke-tests: |
671 | | - if: ${{ !contains(join(github.event.pull_request.labels.*.name, ' '), 'skip-smoke-tests') }} |
672 | 664 | environment: integration |
673 | 665 | permissions: |
674 | 666 | checks: write |
@@ -794,3 +786,32 @@ jobs: |
794 | 786 | path: .covdata |
795 | 787 | retention-days: 1 |
796 | 788 |
|
| 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