Skip to content

Commit

Permalink
auto retry workflow step when wp install fails
Browse files Browse the repository at this point in the history
  • Loading branch information
circlecube committed Dec 5, 2024
1 parent 1b13d6f commit f1de2ee
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 2 deletions.
6 changes: 5 additions & 1 deletion .github/workflows/cypress-matrix.yml
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,11 @@ jobs:
echo '{"wpVersion": "${{ matrix.wpVersion }}","phpVersion": "${{ matrix.phpVersion }}"}' > cypress.env.json
- name: Install WordPress
run: npx wp-env start --debug
uses: nick-fields/retry@v3
with:
timeout_minutes: 4
max_attempts: 3
command: npx wp-env start --debug

- name: Run Cypress Tests
if: ${{ github.repository != 'newfold-labs/wp-plugin-mojo' || github.actor == 'dependabot[bot]' }}
Expand Down
6 changes: 5 additions & 1 deletion .github/workflows/cypress.yml
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,11 @@ jobs:
run: echo '{"config":{"WP_DEBUG_DISPLAY":false},"plugins":["${{ steps.workflow.outputs.DIST }}/${{ steps.workflow.outputs.PACKAGE }}"]}' > .wp-env.override.json

- name: Install WordPress
run: npx @wordpress/env@latest start
uses: nick-fields/retry@v3
with:
timeout_minutes: 4
max_attempts: 3
command: npx wp-env start --debug

- name: Run Cypress Tests
if: ${{ github.repository != 'newfold-labs/wp-plugin-mojo' || github.actor == 'dependabot[bot]' }}
Expand Down

0 comments on commit f1de2ee

Please sign in to comment.