Wrap yarn install with a retry (#2685)

Summary:
Often fails with things like "can't resolve github.com" ... I don't think there's a fix for that apart from trying again.

Pull Request resolved: https://github.com/facebook/flipper/pull/2685

Test Plan: Waiting for things to turn green here.

Reviewed By: timur-valiev

Differential Revision: D30301456

Pulled By: passy

fbshipit-source-id: 585758284e18bd02ab2a905b6f110a32099b861e
This commit is contained in:
Pascal Hartig
2021-08-13 03:29:24 -07:00
committed by Facebook GitHub Bot
parent 0de8a2eeb0
commit 4909296d86

View File

@@ -1,4 +1,4 @@
name: Flipper Node CI
name: Desktop Node CI
on: [push, pull_request]
@@ -17,9 +17,9 @@ jobs:
os: ['ubuntu-latest', 'windows-latest', 'macos-latest']
steps:
- uses: actions/checkout@v1
- uses: actions/checkout@v2
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v1
uses: actions/setup-node@v2
with:
node-version: ${{ matrix.node-version }}
- name: Get yarn cache directory path
@@ -32,9 +32,12 @@ jobs:
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
restore-keys: |
${{ runner.os }}-yarn-
- name: yarn install
run: yarn
working-directory: ${{env.desktop-directory}}
- name: yarn install (with retry)
uses: nick-invision/retry@v2.4.0
with:
command: cd ${{env.desktop-directory}}; yarn
timeout_minutes: 30
max_attempts: 3
- name: lint
run: yarn lint
working-directory: ${{env.desktop-directory}}