Skip to content

Commit

Permalink
Build/Test Tools: Restore automatically retrying failed E2E tests once.
Browse files Browse the repository at this point in the history
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
  • Loading branch information
desrosj committed Jul 25, 2023
1 parent 9e9ae1e commit d80d3e1
Showing 1 changed file with 31 additions and 0 deletions.
31 changes: 31 additions & 0 deletions .github/workflows/end-to-end-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -126,3 +126,34 @@ jobs:

- name: Ensure version-controlled files are not modified or deleted
run: git diff --exit-code

failed-workflow:
name: Failed workflow tasks
runs-on: ubuntu-latest
permissions:
actions: write
needs: [ e2e-tests ]
if: |
always() &&
github.repository == 'WordPress/wordpress-develop' &&
github.event_name != 'pull_request' &&
github.run_attempt < 2 &&
(
needs.e2e-tests.result == 'cancelled' || needs.e2e-tests.result == 'failure'
)
steps:
- name: Dispatch workflow run
uses: actions/github-script@98814c53be79b1d30f795b907e553d8679345975 # v6.4.0
with:
retries: 2
retry-exempt-status-codes: 418
script: |
github.rest.actions.createWorkflowDispatch({
owner: context.repo.owner,
repo: context.repo.repo,
workflow_id: 'failed-workflow.yml',
ref: 'trunk',
inputs: {
run_id: '${{ github.run_id }}'
}
});

0 comments on commit d80d3e1

Please sign in to comment.