From 5f357ddd6fab3b066476b137c539827462494c9c Mon Sep 17 00:00:00 2001 From: sebastien Date: Mon, 18 Nov 2024 10:25:28 +0100 Subject: [PATCH] CI should retry Yarn install --- .github/workflows/argos.yml | 2 +- .github/workflows/build-blog-only.yml | 2 +- .github/workflows/build-hash-router.yml | 2 +- .github/workflows/build-perf.yml | 2 +- .github/workflows/canary-release.yml | 2 +- .github/workflows/continuous-releases.yml | 2 +- .github/workflows/lighthouse-report.yml | 2 +- .github/workflows/lint-autofix.yml | 2 +- .github/workflows/lint.yml | 3 +-- .github/workflows/showcase-test.yml | 2 +- .github/workflows/tests-e2e.yml | 12 ++++++------ .github/workflows/tests-swizzle.yml | 2 +- .github/workflows/tests.yml | 2 +- 13 files changed, 18 insertions(+), 19 deletions(-) diff --git a/.github/workflows/argos.yml b/.github/workflows/argos.yml index 57fd7b5a9de3..4ad85e63b7c5 100644 --- a/.github/workflows/argos.yml +++ b/.github/workflows/argos.yml @@ -35,7 +35,7 @@ jobs: node-version: lts/* - name: Install dependencies - run: yarn install --frozen-lockfile + run: yarn || yarn - name: Install Playwright browsers run: npx playwright install --with-deps chromium diff --git a/.github/workflows/build-blog-only.yml b/.github/workflows/build-blog-only.yml index 21549eadb2eb..172a31db52a7 100644 --- a/.github/workflows/build-blog-only.yml +++ b/.github/workflows/build-blog-only.yml @@ -29,6 +29,6 @@ jobs: node-version: lts/* cache: yarn - name: Installation - run: yarn + run: yarn || yarn - name: Build blog-only run: yarn workspace website build:blogOnly diff --git a/.github/workflows/build-hash-router.yml b/.github/workflows/build-hash-router.yml index 2ffc181d9ea1..cec32eef0c0d 100644 --- a/.github/workflows/build-hash-router.yml +++ b/.github/workflows/build-hash-router.yml @@ -32,7 +32,7 @@ jobs: node-version: lts/* cache: yarn - name: Installation - run: yarn + run: yarn || yarn - name: Build Hash Router run: yarn build:website:fast diff --git a/.github/workflows/build-perf.yml b/.github/workflows/build-perf.yml index 64d1dc02c5a5..82df7621faca 100644 --- a/.github/workflows/build-perf.yml +++ b/.github/workflows/build-perf.yml @@ -80,7 +80,7 @@ jobs: node-version: lts/* cache: yarn - name: Installation - run: yarn + run: yarn || yarn # Ensure build with a cold cache does not increase too much - name: Build (cold cache) diff --git a/.github/workflows/canary-release.yml b/.github/workflows/canary-release.yml index ed51b2ed70a6..724a8f529e20 100644 --- a/.github/workflows/canary-release.yml +++ b/.github/workflows/canary-release.yml @@ -41,7 +41,7 @@ jobs: env: NPM_TOKEN: ${{ secrets.NPM_AUTH_TOKEN }} - name: Installation - run: yarn + run: yarn || yarn - name: Publish Canary release run: | yarn canary diff --git a/.github/workflows/continuous-releases.yml b/.github/workflows/continuous-releases.yml index bf2356729815..8ec120b96978 100644 --- a/.github/workflows/continuous-releases.yml +++ b/.github/workflows/continuous-releases.yml @@ -27,7 +27,7 @@ jobs: cache: yarn - name: Installation - run: yarn + run: yarn || yarn - name: Build packages run: yarn build:packages diff --git a/.github/workflows/lighthouse-report.yml b/.github/workflows/lighthouse-report.yml index bc9e9d38093d..97bf69a9dd62 100644 --- a/.github/workflows/lighthouse-report.yml +++ b/.github/workflows/lighthouse-report.yml @@ -29,7 +29,7 @@ jobs: node-version: lts/* - name: Install dependencies - run: yarn install --frozen-lockfile + run: yarn || yarn - name: Build website fast run: yarn build:website:fast diff --git a/.github/workflows/lint-autofix.yml b/.github/workflows/lint-autofix.yml index 10d26262a8c0..cfd54eda5d34 100644 --- a/.github/workflows/lint-autofix.yml +++ b/.github/workflows/lint-autofix.yml @@ -25,7 +25,7 @@ jobs: ref: ${{ github.head_ref }} - name: Installation - run: yarn + run: yarn || yarn - name: AutoFix Format run: yarn format diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index 8027c737bd22..63929dc49af5 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -27,8 +27,7 @@ jobs: node-version: lts/* cache: yarn - name: Installation - run: yarn - # run: yarn install --immutable # Fails if yarn.lock is modified (unfortunately only works for Yarn 2, and --frozen-lockfile is not the same!) + run: yarn install --frozen-lockfile || yarn install --frozen-lockfile || yarn install --frozen-lockfile - name: Check immutable yarn.lock run: git diff --exit-code diff --git a/.github/workflows/showcase-test.yml b/.github/workflows/showcase-test.yml index 4224bf6c1387..4237862dae3c 100644 --- a/.github/workflows/showcase-test.yml +++ b/.github/workflows/showcase-test.yml @@ -29,6 +29,6 @@ jobs: node-version: lts/* cache: yarn - name: Installation - run: yarn + run: yarn || yarn - name: Test run: yarn test website/src/data/__tests__/user.test.ts diff --git a/.github/workflows/tests-e2e.yml b/.github/workflows/tests-e2e.yml index 0b8bd7208384..e39a94f4e0a8 100644 --- a/.github/workflows/tests-e2e.yml +++ b/.github/workflows/tests-e2e.yml @@ -48,11 +48,11 @@ jobs: node-version: ${{ matrix.node }} cache: yarn - name: Installation - run: yarn + run: yarn || yarn - name: Generate test-website project against main branch run: yarn test:build:website -s - name: Install test-website project with Yarn v1 - run: yarn install + run: yarn || yarn working-directory: ../test-website env: npm_config_registry: http://localhost:4873 @@ -89,7 +89,7 @@ jobs: node-version: lts/* cache: yarn - name: Installation - run: yarn + run: yarn || yarn || yarn - name: Generate test-website project with ${{ matrix.variant }} against main branch run: yarn test:build:website ${{ matrix.variant }} - name: Install test-website project with Yarn Berry and nodeLinker = ${{ matrix.nodeLinker }} @@ -105,7 +105,7 @@ jobs: # https://yarnpkg.com/features/pnp#fallback-mode yarn config set pnpFallbackMode none - yarn install + yarn || yarn || yarn working-directory: ../test-website env: YARN_ENABLE_IMMUTABLE_INSTALLS: false # Yarn berry should create the lockfile, despite CI env @@ -158,7 +158,7 @@ jobs: node-version: lts/* cache: yarn - name: Installation - run: yarn + run: yarn || yarn - name: Generate test-website project against main branch run: yarn test:build:website -s - name: Install test-website project with npm @@ -195,7 +195,7 @@ jobs: node-version: lts/* cache: yarn - name: Installation - run: yarn + run: yarn || yarn - name: Generate test-website project against main branch run: yarn test:build:website -s - name: Install test-website project with pnpm diff --git a/.github/workflows/tests-swizzle.yml b/.github/workflows/tests-swizzle.yml index 1480a6207aa1..dad0e4c89ae2 100644 --- a/.github/workflows/tests-swizzle.yml +++ b/.github/workflows/tests-swizzle.yml @@ -33,7 +33,7 @@ jobs: node-version: lts/* cache: yarn - name: Installation - run: yarn + run: yarn || yarn # Swizzle all the theme components - name: Swizzle (${{matrix.action}} - ${{matrix.variant}}) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 6930b36a6f8c..626a8d0be13d 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -37,7 +37,7 @@ jobs: node-version: ${{ matrix.node }} cache: yarn - name: Installation - run: yarn + run: yarn || yarn || yarn # 3 attempts to avoid timeout errors... - name: Test run: yarn test - name: Remove Theme Internal Re-export