Skip to content

Commit

Permalink
chore: add retry to CI workflows (#5335)
Browse files Browse the repository at this point in the history
Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
eduardoboucas and kodiakhq[bot] authored Jan 10, 2023
1 parent 6a00828 commit 83510e4
Showing 3 changed files with 18 additions and 3 deletions.
7 changes: 6 additions & 1 deletion .github/workflows/integration-tests.yml
Original file line number Diff line number Diff line change
@@ -75,8 +75,13 @@ jobs:
run: npm run test:init
if: '${{ !steps.release-check.outputs.IS_RELEASE }}'
- name: Tests
uses: nick-fields/retry@v2
if: '${{ !steps.release-check.outputs.IS_RELEASE }}'
run: npm run test:ci:vitest:integration -- --shard=${{ matrix.shard }} ${{ steps.changed.outputs.value }}
with:
timeout_minutes: 15
max_attempts: 3
retry_on: error
command: npm run test:ci:vitest:integration -- --shard=${{ matrix.shard }} ${{ steps.changed.outputs.value }}
env:
# GitHub secrets are not available when running on PR from forks
# We set a flag so we can skip tests that access Netlify API
7 changes: 6 additions & 1 deletion .github/workflows/legacy-tests.yml
Original file line number Diff line number Diff line change
@@ -75,7 +75,12 @@ jobs:
run: npm run test:init
if: '${{ !steps.release-check.outputs.IS_RELEASE }}'
- name: Tests
run: ${{ steps.testCommand.outputs.value }}
uses: nick-fields/retry@v2
with:
timeout_minutes: 15
max_attempts: 3
retry_on: error
command: ${{ steps.testCommand.outputs.value }}
env:
# GitHub secrets are not available when running on PR from forks
# We set a flag so we can skip tests that access Netlify API
7 changes: 6 additions & 1 deletion .github/workflows/unit-tests.yml
Original file line number Diff line number Diff line change
@@ -44,5 +44,10 @@ jobs:
run: npm run format:ci
if: '${{!steps.release-check.outputs.IS_RELEASE}}'
- name: Run unit tests
run: npm run test:ci:vitest:unit
uses: nick-fields/retry@v2
with:
timeout_minutes: 15
max_attempts: 3
retry_on: error
command: npm run test:ci:vitest:unit
if: '${{!steps.release-check.outputs.IS_RELEASE}}'

1 comment on commit 83510e4

@github-actions
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

📊 Benchmark results

  • Package size: 259 MB

Please sign in to comment.