Skip to content

Commit d80d3e1

Browse files
committed
Build/Test Tools: Restore automatically retrying failed E2E tests once.
This restores the GitHub Actions job responsible for automatically retrying a failed workflow once within the E2E testing workflow. [56198] disabled Slack notifications for this workflow because of the increased number of timeout errors occurring after recent changes until they could be further investigated. Even though the signal-to-noise ration was way too high, there’s still benefit in retrying the workflow once to see if the timeout can be resolved without human intervention. The one retry attempt will not result in any Slack notifications. Follow up to [56198]. See #58779. git-svn-id: https://develop.svn.wordpress.org/trunk@56308 602fd350-edb4-49c9-b593-d223f7449a82
1 parent 9e9ae1e commit d80d3e1

1 file changed

Lines changed: 31 additions & 0 deletions

File tree

.github/workflows/end-to-end-tests.yml

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -126,3 +126,34 @@ jobs:
126126

127127
- name: Ensure version-controlled files are not modified or deleted
128128
run: git diff --exit-code
129+
130+
failed-workflow:
131+
name: Failed workflow tasks
132+
runs-on: ubuntu-latest
133+
permissions:
134+
actions: write
135+
needs: [ e2e-tests ]
136+
if: |
137+
always() &&
138+
github.repository == 'WordPress/wordpress-develop' &&
139+
github.event_name != 'pull_request' &&
140+
github.run_attempt < 2 &&
141+
(
142+
needs.e2e-tests.result == 'cancelled' || needs.e2e-tests.result == 'failure'
143+
)
144+
steps:
145+
- name: Dispatch workflow run
146+
uses: actions/github-script@98814c53be79b1d30f795b907e553d8679345975 # v6.4.0
147+
with:
148+
retries: 2
149+
retry-exempt-status-codes: 418
150+
script: |
151+
github.rest.actions.createWorkflowDispatch({
152+
owner: context.repo.owner,
153+
repo: context.repo.repo,
154+
workflow_id: 'failed-workflow.yml',
155+
ref: 'trunk',
156+
inputs: {
157+
run_id: '${{ github.run_id }}'
158+
}
159+
});

0 commit comments

Comments
 (0)