From 6ca3ef61e22b7dd2339e988c456f41652f58c8b6 Mon Sep 17 00:00:00 2001 From: Jon Simantov Date: Mon, 22 Aug 2022 11:27:16 -0700 Subject: [PATCH] Add retry to npm installation of firebase-tools --- .github/workflows/desktop.yml | 8 ++++-- .github/workflows/integration_tests.yml | 35 +++++++++++++++++++++---- 2 files changed, 36 insertions(+), 7 deletions(-) diff --git a/.github/workflows/desktop.yml b/.github/workflows/desktop.yml index cacba17827..82f044a8cb 100644 --- a/.github/workflows/desktop.yml +++ b/.github/workflows/desktop.yml @@ -359,8 +359,12 @@ jobs: with: node-version: 14.x - name: Setup Firestore Emulator - run: | - npm install -g firebase-tools + uses: nick-invision/retry@v2 + with: + shell: bash + timeout_minutes: 5 + max_attempts: 3 + command: npm install -g firebase-tools - name: Setup java uses: actions/setup-java@v3 with: diff --git a/.github/workflows/integration_tests.yml b/.github/workflows/integration_tests.yml index 0b07b34673..fe1ddf8625 100644 --- a/.github/workflows/integration_tests.yml +++ b/.github/workflows/integration_tests.yml @@ -739,8 +739,12 @@ jobs: with: node-version: 14.x - name: Setup Firestore Emulator - run: | - npm install -g firebase-tools + uses: nick-invision/retry@v2 + with: + shell: bash + timeout_minutes: 5 + max_attempts: 3 + command: npm install -g firebase-tools - name: Setup java uses: actions/setup-java@v3 with: @@ -997,9 +1001,16 @@ jobs: distribution: 'temurin' java-version: '17' - name: Setup Firestore Emulator + if: steps.get-device-type.outputs.device_type == 'virtual' && contains(needs.check_and_prepare.outputs.apis, 'firestore') + uses: nick-invision/retry@v2 + with: + shell: bash + timeout_minutes: 5 + max_attempts: 3 + command: npm install -g firebase-tools + - name: Start Firestore Emulator if: steps.get-device-type.outputs.device_type == 'virtual' && contains(needs.check_and_prepare.outputs.apis, 'firestore') run: | - npm install -g firebase-tools firebase emulators:start --only firestore --project demo-example & - name: Setup java 8 for test_simulator.py uses: actions/setup-java@v3 @@ -1132,9 +1143,16 @@ jobs: distribution: 'temurin' java-version: '17' - name: Setup Firestore Emulator + if: steps.get-device-type.outputs.device_type == 'virtual' && contains(needs.check_and_prepare.outputs.apis, 'firestore') + uses: nick-invision/retry@v2 + with: + shell: bash + timeout_minutes: 5 + max_attempts: 3 + command: npm install -g firebase-tools + - name: Start Firestore Emulator if: steps.get-device-type.outputs.device_type == 'virtual' && contains(needs.check_and_prepare.outputs.apis, 'firestore') run: | - npm install -g firebase-tools firebase emulators:start --only firestore --project demo-example & - name: Run iOS integration tests on Simulator locally timeout-minutes: 120 @@ -1241,9 +1259,16 @@ jobs: distribution: 'temurin' java-version: '17' - name: Setup Firestore Emulator + if: contains(needs.check_and_prepare.outputs.apis, 'firestore') + uses: nick-invision/retry@v2 + with: + shell: bash + timeout_minutes: 5 + max_attempts: 3 + command: npm install -g firebase-tools + - name: Start Firestore Emulator if: contains(needs.check_and_prepare.outputs.apis, 'firestore') run: | - npm install -g firebase-tools firebase emulators:start --only firestore --project demo-example & - name: Run tvOS integration tests on Simulator locally timeout-minutes: 90