From ca02c4bb40325c3efbc60969e9199a0c379d2d6b Mon Sep 17 00:00:00 2001 From: lauren Date: Mon, 17 Mar 2025 14:13:27 -0400 Subject: [PATCH] [ci][ez] use yarn --cwd (#32650) Run yarn install via `--cwd` instead of `working-directory` to make the labels clearer --- [//]: # (BEGIN SAPLING FOOTER) Stack created with [Sapling](https://sapling-scm.com). Best reviewed with [ReviewStack](https://reviewstack.dev/facebook/react/pull/32650). * __->__ #32650 * #32649 * #32648 --- .github/workflows/devtools_regression_tests.yml | 3 +-- .github/workflows/runtime_build_and_test.yml | 15 +++++---------- .github/workflows/runtime_commit_artifacts.yml | 5 +---- .github/workflows/runtime_eslint_plugin_e2e.yml | 3 +-- .github/workflows/runtime_prereleases.yml | 3 +-- .../runtime_releases_from_npm_manual.yml | 3 +-- 6 files changed, 10 insertions(+), 22 deletions(-) diff --git a/.github/workflows/devtools_regression_tests.yml b/.github/workflows/devtools_regression_tests.yml index 9399b80f0e..844b82b82c 100644 --- a/.github/workflows/devtools_regression_tests.yml +++ b/.github/workflows/devtools_regression_tests.yml @@ -35,8 +35,7 @@ jobs: - name: Ensure clean build directory run: rm -rf build - run: yarn install --frozen-lockfile - - run: yarn install --frozen-lockfile - working-directory: scripts/release + - run: yarn --cwd scripts/release install --frozen-lockfile - name: Download react-devtools artifacts for base revision run: | git fetch origin main diff --git a/.github/workflows/runtime_build_and_test.yml b/.github/workflows/runtime_build_and_test.yml index 63e432b4dc..d685c848e2 100644 --- a/.github/workflows/runtime_build_and_test.yml +++ b/.github/workflows/runtime_build_and_test.yml @@ -169,8 +169,7 @@ jobs: - name: Ensure clean build directory run: rm -rf build - run: yarn install --frozen-lockfile - - run: yarn install --frozen-lockfile - working-directory: compiler + - run: yarn --cwd compiler install --frozen-lockfile - run: yarn test ${{ matrix.params }} --ci --shard=${{ matrix.shard }} # ----- BUILD ----- @@ -208,8 +207,7 @@ jobs: - name: Ensure clean build directory run: rm -rf build - run: yarn install --frozen-lockfile - - run: yarn install --frozen-lockfile - working-directory: compiler + - run: yarn --cwd compiler install --frozen-lockfile - run: yarn build --index=${{ matrix.worker_id }} --total=20 --r=${{ matrix.release_channel }} --ci env: CI: github @@ -287,8 +285,7 @@ jobs: - name: Ensure clean build directory run: rm -rf build - run: yarn install --frozen-lockfile - - run: yarn install --frozen-lockfile - working-directory: compiler + - run: yarn --cwd compiler install --frozen-lockfile - name: Restore archived build uses: actions/download-artifact@v4 with: @@ -438,8 +435,7 @@ jobs: key: fixtures_dom-node_modules-v5-${{ runner.arch }}-${{ runner.os }}-${{ hashFiles('yarn.lock') }} - name: Ensure clean build directory run: rm -rf build - - run: yarn install --frozen-lockfile - working-directory: fixtures/dom + - run: yarn --cwd fixtures/dom install --frozen-lockfile - name: Restore archived build uses: actions/download-artifact@v4 with: @@ -635,8 +631,7 @@ jobs: key: runtime-node_modules-v5-${{ runner.arch }}-${{ runner.os }}-${{ hashFiles('yarn.lock') }} - name: Ensure clean build directory run: rm -rf build - - run: yarn install --frozen-lockfile - working-directory: scripts/release + - run: yarn --cwd scripts/release install --frozen-lockfile - name: Download artifacts for base revision run: | GH_TOKEN=${{ github.token }} scripts/release/download-experimental-build.js --commit=$(git rev-parse ${{ github.event.pull_request.base.sha }}) diff --git a/.github/workflows/runtime_commit_artifacts.yml b/.github/workflows/runtime_commit_artifacts.yml index 6b1cad2245..5de51b2664 100644 --- a/.github/workflows/runtime_commit_artifacts.yml +++ b/.github/workflows/runtime_commit_artifacts.yml @@ -84,10 +84,7 @@ jobs: - name: Ensure clean build directory run: rm -rf build - run: yarn install --frozen-lockfile - name: yarn install (react) - - run: yarn install --frozen-lockfile - name: yarn install (scripts/release) - working-directory: scripts/release + - run: yarn --cwd scripts/release install --frozen-lockfile - name: Download artifacts for base revision run: | GH_TOKEN=${{ github.token }} scripts/release/download-experimental-build.js --commit=${{ inputs.commit_sha || github.event.workflow_run.head_sha || github.sha }} diff --git a/.github/workflows/runtime_eslint_plugin_e2e.yml b/.github/workflows/runtime_eslint_plugin_e2e.yml index 8b8222721c..2deb958ea7 100644 --- a/.github/workflows/runtime_eslint_plugin_e2e.yml +++ b/.github/workflows/runtime_eslint_plugin_e2e.yml @@ -48,8 +48,7 @@ jobs: - name: Ensure clean build directory run: rm -rf build - run: yarn install --frozen-lockfile - - run: yarn install --frozen-lockfile - working-directory: compiler + - run: yarn --cwd compiler install --frozen-lockfile - name: Build plugin working-directory: fixtures/eslint-v${{ matrix.eslint_major }} run: node build.mjs diff --git a/.github/workflows/runtime_prereleases.yml b/.github/workflows/runtime_prereleases.yml index 293e5f2ce9..ce44246df9 100644 --- a/.github/workflows/runtime_prereleases.yml +++ b/.github/workflows/runtime_prereleases.yml @@ -45,8 +45,7 @@ jobs: - name: Ensure clean build directory run: rm -rf build - run: yarn install --frozen-lockfile - - run: yarn install --frozen-lockfile - working-directory: scripts/release + - run: yarn --cwd scripts/release install --frozen-lockfile - run: | scripts/release/prepare-release-from-ci.js --skipTests -r ${{ inputs.release_channel }} --commit=${{ inputs.commit_sha }} cp ./scripts/release/ci-npmrc ~/.npmrc diff --git a/.github/workflows/runtime_releases_from_npm_manual.yml b/.github/workflows/runtime_releases_from_npm_manual.yml index 0293696428..d04f202a7e 100644 --- a/.github/workflows/runtime_releases_from_npm_manual.yml +++ b/.github/workflows/runtime_releases_from_npm_manual.yml @@ -77,8 +77,7 @@ jobs: - name: Ensure clean build directory run: rm -rf build - run: yarn install --frozen-lockfile - - run: yarn install --frozen-lockfile - working-directory: scripts/release + - run: yarn --cwd scripts/release install --frozen-lockfile - run: cp ./scripts/release/ci-npmrc ~/.npmrc - if: '${{ inputs.only_packages }}' name: 'Prepare ${{ inputs.only_packages }} from NPM'