|
23 | 23 |
|
24 | 24 | e2e-kind: |
25 | 25 | runs-on: ubuntu-latest |
| 26 | + outputs: |
| 27 | + alerts-found: ${{ steps.alert_output.outputs.alerts-found }} |
26 | 28 | steps: |
27 | 29 | - uses: actions/checkout@v5 |
28 | 30 | with: |
|
34 | 36 |
|
35 | 37 | - name: Run e2e tests |
36 | 38 | run: ARTIFACT_PATH=/tmp/artifacts E2E_SUMMARY_OUTPUT=$GITHUB_STEP_SUMMARY make test-e2e |
37 | | - |
| 39 | + - name: Mark for alerts |
| 40 | + id: alert_output |
| 41 | + if: contains(github.step_summary, 'Firing Alerts') |
| 42 | + run: echo "alerts-found=true" >> "$GITHUB_OUTPUT" |
38 | 43 | - uses: actions/upload-artifact@v4 |
39 | 44 | if: failure() |
40 | 45 | with: |
|
50 | 55 |
|
51 | 56 | experimental-e2e: |
52 | 57 | runs-on: ubuntu-latest |
| 58 | + outputs: |
| 59 | + alerts-found: ${{ steps.alert_output.outputs.alerts-found }} |
53 | 60 | steps: |
54 | 61 | - uses: actions/checkout@v5 |
55 | 62 | with: |
|
61 | 68 |
|
62 | 69 | - name: Run e2e tests |
63 | 70 | run: ARTIFACT_PATH=/tmp/artifacts E2E_SUMMARY_OUTPUT=$GITHUB_STEP_SUMMARY make test-experimental-e2e |
64 | | - |
| 71 | + - name: Mark for alerts |
| 72 | + id: alert_output |
| 73 | + if: contains(github.step_summary, 'Firing Alerts') |
| 74 | + run: echo "alerts-found=true" >> "$GITHUB_OUTPUT" |
65 | 75 | - uses: actions/upload-artifact@v4 |
66 | 76 | if: failure() |
67 | 77 | with: |
@@ -111,3 +121,41 @@ jobs: |
111 | 121 | name: upgrade-experimental-e2e-artifacts |
112 | 122 | path: /tmp/artifacts/ |
113 | 123 |
|
| 124 | + report-performance: |
| 125 | + runs-on: ubuntu-latest |
| 126 | + needs: [ experimental-e2e, e2e-kind ] |
| 127 | + steps: |
| 128 | + - name: Find Previous Alert Comment |
| 129 | + id: find_comment |
| 130 | + uses: peter-evans/find-comment@v3 |
| 131 | + with: |
| 132 | + issue-number: ${{ github.event.pull_request.number }} |
| 133 | + comment-author: 'github-actions[bot]' |
| 134 | + body-includes: '**Alerts Found**' |
| 135 | + |
| 136 | + - name: Delete comment |
| 137 | + uses: detomarco/delete-comments@1.1.0 |
| 138 | + if: | |
| 139 | + needs.e2e-kind.outputs.alerts-found == false && |
| 140 | + needs.experimental-e2e.outputs.alerts-found == false |
| 141 | + with: |
| 142 | + comment-id: ${{ steps.find_comment.outputs.comment-id }} |
| 143 | + |
| 144 | + - name: Post Failure Comment |
| 145 | + uses: peter-evans/create-or-update-comment@v4 |
| 146 | + if: | |
| 147 | + needs.e2e-kind.outputs.alerts-found == true || |
| 148 | + needs.experimental-e2e.outputs.alerts-found == true |
| 149 | + with: |
| 150 | + issue-number: ${{ github.event.pull_request.number }} |
| 151 | + comment-id: ${{ steps.find_comment.outputs.comment-id }} |
| 152 | + edit-mode: replace |
| 153 | + body: | |
| 154 | + **Alerts Found** |
| 155 | +
|
| 156 | + /hold |
| 157 | + |
| 158 | + A hold has been placed on this PR due to performance alerts during the CI's e2e run. |
| 159 | + View the summary [here](${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}) for detaills. |
| 160 | +
|
| 161 | + To acknowledge this warning and continue anyway, leave an `/unhold` comment. |
0 commit comments