ci: retry install three times (#3924)

This commit is contained in:
Alex Yang
2023-08-23 13:22:04 -05:00
committed by GitHub
parent 834771878e
commit 4a003878e2
4 changed files with 14 additions and 24 deletions

View File

@@ -6,9 +6,13 @@ runs:
steps: steps:
- name: 'Install @electron-forge/maker-dmg' - name: 'Install @electron-forge/maker-dmg'
if: runner.os == 'macos' if: runner.os == 'macos'
shell: bash uses: nick-fields/retry@v2
working-directory: ./apps/electron working-directory: ./apps/electron
run: yarn add @electron-forge/maker-dmg --dev with:
timeout_minutes: 10
max_attempts: 3
retry_on: timeout
command: yarn add @electron-forge/maker-dmg --dev
env: env:
HUSKY: '0' HUSKY: '0'
PLAYWRIGHT_SKIP_BROWSER_DOWNLOAD: '1' PLAYWRIGHT_SKIP_BROWSER_DOWNLOAD: '1'

View File

@@ -39,20 +39,12 @@ runs:
run: yarn config set nmMode hardlinks-local run: yarn config set nmMode hardlinks-local
- name: yarn install - name: yarn install
if: ${{ inputs.package-install == 'true' }} uses: nick-fields/retry@v2
continue-on-error: true with:
shell: bash timeout_minutes: 10
run: yarn install ${{ inputs.extra-flags }} max_attempts: 3
env: retry_on: timeout
HUSKY: '0' command: yarn install ${{ inputs.extra-flags }}
PLAYWRIGHT_SKIP_BROWSER_DOWNLOAD: '1'
ELECTRON_SKIP_BINARY_DOWNLOAD: '1'
SENTRYCLI_SKIP_DOWNLOAD: '1'
- name: yarn install (try again)
if: ${{ steps.install.outcome == 'failure' }}
shell: bash
run: yarn install ${{ inputs.extra-flags }}
env: env:
HUSKY: '0' HUSKY: '0'
PLAYWRIGHT_SKIP_BROWSER_DOWNLOAD: '1' PLAYWRIGHT_SKIP_BROWSER_DOWNLOAD: '1'

View File

@@ -10,8 +10,6 @@ on:
- README.md - README.md
- .github/** - .github/**
- '!.github/workflows/nx.yml' - '!.github/workflows/nx.yml'
- '!.github/actions/build-rust/action.yml'
- '!.github/actions/setup-node/action.yml'
pull_request: pull_request:
merge_group: merge_group:
branches: branches:
@@ -22,15 +20,13 @@ on:
- README.md - README.md
- .github/** - .github/**
- '!.github/workflows/nx.yml' - '!.github/workflows/nx.yml'
- '!.github/actions/build-rust/action.yml'
- '!.github/actions/setup-node/action.yml'
jobs: jobs:
main: main:
name: Nx Cloud - Main Job name: Nx Cloud - Main Job
uses: nrwl/ci/.github/workflows/nx-cloud-main.yml@v0.13.0 uses: nrwl/ci/.github/workflows/nx-cloud-main.yml@v0.13.0
with: with:
runs-on: macos-latest runs-on: ubuntu-latest
main-branch-name: master main-branch-name: master
number-of-agents: 5 number-of-agents: 5
init-commands: | init-commands: |
@@ -47,7 +43,7 @@ jobs:
name: Nx Cloud - Agents name: Nx Cloud - Agents
uses: nrwl/ci/.github/workflows/nx-cloud-agents.yml@v0.13.0 uses: nrwl/ci/.github/workflows/nx-cloud-agents.yml@v0.13.0
with: with:
runs-on: macos-latest runs-on: ubuntu-latest
number-of-agents: 5 number-of-agents: 5
environment-variables: | environment-variables: |
BUILD_TYPE=canary BUILD_TYPE=canary

View File

@@ -103,10 +103,8 @@ jobs:
steps: steps:
- uses: actions/checkout@v3 - uses: actions/checkout@v3
- name: Setup Node.js - name: Setup Node.js
timeout-minutes: 10
uses: ./.github/actions/setup-node uses: ./.github/actions/setup-node
- name: Setup Maker - name: Setup Maker
timeout-minutes: 10
uses: ./.github/actions/setup-maker uses: ./.github/actions/setup-maker
- name: Build AFFiNE native - name: Build AFFiNE native
uses: ./.github/actions/build-rust uses: ./.github/actions/build-rust