Skip to content

Commit 83510e4

Browse files
chore: add retry to CI workflows (#5335)
Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
1 parent 6a00828 commit 83510e4

File tree

3 files changed

+18
-3
lines changed

3 files changed

+18
-3
lines changed

.github/workflows/integration-tests.yml

+6-1
Original file line numberDiff line numberDiff line change
@@ -75,8 +75,13 @@ jobs:
7575
run: npm run test:init
7676
if: '${{ !steps.release-check.outputs.IS_RELEASE }}'
7777
- name: Tests
78+
uses: nick-fields/retry@v2
7879
if: '${{ !steps.release-check.outputs.IS_RELEASE }}'
79-
run: npm run test:ci:vitest:integration -- --shard=${{ matrix.shard }} ${{ steps.changed.outputs.value }}
80+
with:
81+
timeout_minutes: 15
82+
max_attempts: 3
83+
retry_on: error
84+
command: npm run test:ci:vitest:integration -- --shard=${{ matrix.shard }} ${{ steps.changed.outputs.value }}
8085
env:
8186
# GitHub secrets are not available when running on PR from forks
8287
# We set a flag so we can skip tests that access Netlify API

.github/workflows/legacy-tests.yml

+6-1
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,12 @@ jobs:
7575
run: npm run test:init
7676
if: '${{ !steps.release-check.outputs.IS_RELEASE }}'
7777
- name: Tests
78-
run: ${{ steps.testCommand.outputs.value }}
78+
uses: nick-fields/retry@v2
79+
with:
80+
timeout_minutes: 15
81+
max_attempts: 3
82+
retry_on: error
83+
command: ${{ steps.testCommand.outputs.value }}
7984
env:
8085
# GitHub secrets are not available when running on PR from forks
8186
# We set a flag so we can skip tests that access Netlify API

.github/workflows/unit-tests.yml

+6-1
Original file line numberDiff line numberDiff line change
@@ -44,5 +44,10 @@ jobs:
4444
run: npm run format:ci
4545
if: '${{!steps.release-check.outputs.IS_RELEASE}}'
4646
- name: Run unit tests
47-
run: npm run test:ci:vitest:unit
47+
uses: nick-fields/retry@v2
48+
with:
49+
timeout_minutes: 15
50+
max_attempts: 3
51+
retry_on: error
52+
command: npm run test:ci:vitest:unit
4853
if: '${{!steps.release-check.outputs.IS_RELEASE}}'

0 commit comments

Comments
 (0)