Skip to content

Commit 5c786ef

Browse files
authored
Merge pull request #8975 from BitGo/gokuldevaraju330/wcn-865-fix-flaky-yarn-audit-ci-step-with-retry-logic
fix(ci): retry yarn audit on transient network errors (WCN-865)
2 parents 2a7025e + 49433e0 commit 5c786ef

2 files changed

Lines changed: 12 additions & 3 deletions

File tree

.github/workflows/npmjs-release.yml

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -236,9 +236,13 @@ jobs:
236236
run: |
237237
yarn install --frozen-lockfile
238238
239+
- name: Install retry
240+
uses: BitGo/install-github-release-binary@v2
241+
with:
242+
targets: EricCrosson/retry@v1
243+
239244
- name: Run yarn audit
240-
run: |
241-
yarn run audit-high
245+
run: retry --up-to 2x --every 3s -- yarn run audit-high --retry-on-network-failure
242246

243247
- name: Run dependency check
244248
run: |

.github/workflows/publish.yml

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,8 +36,13 @@ jobs:
3636
- name: Install BitGoJS
3737
run: sfw yarn install --with-frozen-lockfile
3838

39+
- name: Install retry
40+
uses: BitGo/install-github-release-binary@v2
41+
with:
42+
targets: EricCrosson/retry@v1
43+
3944
- name: Audit Dependencies
40-
run: yarn run improved-yarn-audit --min-severity high
45+
run: retry --up-to 2x --every 3s -- yarn run improved-yarn-audit --min-severity high --retry-on-network-failure
4146

4247
- name: Set Environment Variable for Alpha
4348
if: github.ref != 'refs/heads/master' # only publish changes if on feature branches

0 commit comments

Comments
 (0)