Skip to content

Commit bf4f74f

Browse files
chore: retry failed CI runs (#4789)
1 parent 7bb2f9c commit bf4f74f

File tree

1 file changed

+12
-2
lines changed

1 file changed

+12
-2
lines changed

.github/workflows/workflow.yml

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -48,8 +48,13 @@ jobs:
4848
run: npx nx affected --target=build
4949
if: ${{ !steps.release-check.outputs.IS_RELEASE }}
5050
- name: Tests
51-
run: npx nx affected --target=test:ci --exclude=@netlify/build --parallel=3
51+
uses: nick-fields/retry@v2
5252
if: ${{ !steps.release-check.outputs.IS_RELEASE }}
53+
with:
54+
timeout_minutes: 15
55+
max_attempts: 3
56+
retry_on: error
57+
command: npx nx affected --target=test:ci --exclude=@netlify/build --parallel=3
5358

5459
test-build:
5560
runs-on: ${{ matrix.os }}
@@ -134,12 +139,17 @@ jobs:
134139
run: npm run build
135140
if: ${{ !steps.release-check.outputs.IS_RELEASE }}
136141
- name: Tests
137-
run: npx lerna run test:ci --scope @netlify/build
142+
uses: nick-fields/retry@v2
138143
if: ${{ !steps.release-check.outputs.IS_RELEASE }}
139144
env:
140145
# split tests across multiple machines
141146
CI_NODE_INDEX: ${{ matrix.machine }}
142147
CI_NODE_TOTAL: 4
148+
with:
149+
timeout_minutes: 15
150+
max_attempts: 3
151+
retry_on: error
152+
command: npx lerna run test:ci --scope @netlify/build
143153
- name: Get test coverage flags
144154
id: test-coverage-flags
145155
if: ${{ !steps.release-check.outputs.IS_RELEASE }}

0 commit comments

Comments
 (0)