|
9 | 9 | types: [labeled] |
10 | 10 | branches: [ main, master ] |
11 | 11 |
|
12 | | -# Required for pull_request_target to comment on PRs |
13 | | -permissions: |
14 | | - contents: read |
15 | | - pull-requests: write |
16 | | - issues: write |
17 | | - |
18 | 12 | concurrency: |
19 | 13 | group: e2e-tests-${{ github.event.pull_request.number }} |
20 | 14 | cancel-in-progress: true |
|
74 | 68 | timeout-minutes: 25 |
75 | 69 |
|
76 | 70 | steps: |
77 | | - - name: Add comment to PR |
78 | | - continue-on-error: true |
79 | | - uses: actions/github-script@v7 |
80 | | - with: |
81 | | - script: | |
82 | | - github.rest.issues.createComment({ |
83 | | - issue_number: ${{ github.event.pull_request.number }}, |
84 | | - owner: context.repo.owner, |
85 | | - repo: context.repo.repo, |
86 | | - body: '🔒 **E2E Tests Started**\n\nRunning full test suite with agent interaction.\n\nTriggered by: @${{ github.actor }}' |
87 | | - }) |
88 | | -
|
89 | 71 | - name: Checkout PR code |
90 | 72 | uses: actions/checkout@v6 |
91 | 73 | with: |
@@ -246,25 +228,6 @@ jobs: |
246 | 228 | path: e2e/cypress/videos |
247 | 229 | if-no-files-found: ignore |
248 | 230 | retention-days: 7 |
249 | | - |
250 | | - - name: Comment test result on PR |
251 | | - if: always() |
252 | | - continue-on-error: true |
253 | | - uses: actions/github-script@v7 |
254 | | - with: |
255 | | - script: | |
256 | | - const status = '${{ job.status }}'; |
257 | | - const icon = status === 'success' ? '✅' : '❌'; |
258 | | - const message = status === 'success' |
259 | | - ? 'All E2E tests passed (including agent interaction)!' |
260 | | - : 'Some E2E tests failed. Check the workflow logs for details.'; |
261 | | - |
262 | | - github.rest.issues.createComment({ |
263 | | - issue_number: ${{ github.event.pull_request.number }}, |
264 | | - owner: context.repo.owner, |
265 | | - repo: context.repo.repo, |
266 | | - body: `${icon} **E2E Tests ${status}**\n\n${message}\n\n[View workflow run](https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }})` |
267 | | - }) |
268 | 231 |
|
269 | 232 | - name: Debug logs on failure |
270 | 233 | if: failure() |
|
0 commit comments