From 717dbf896bdfa72dfea9dc3f92f4ada68ea2ad4b Mon Sep 17 00:00:00 2001 From: MUI bot <2109932+Janpot@users.noreply.github.com> Date: Wed, 25 Sep 2024 13:48:02 +0200 Subject: [PATCH 1/2] [code-infra] Remove custom playwright installation steps --- .circleci/config.yml | 45 ++++++++++++-------------------------------- 1 file changed, 12 insertions(+), 33 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index f1418581..47601451 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -36,13 +36,12 @@ default-job: &default-job type: string default: << pipeline.parameters.e2e-base-url >> environment: - # Keep in sync with "Save playwright cache" - PLAYWRIGHT_BROWSERS_PATH: /tmp/pw-browsers # expose it globally otherwise we have to thread it from each job to the install command BROWSERSTACK_FORCE: << pipeline.parameters.browserstack-force >> REACT_VERSION: << parameters.react-version >> TEST_GATE: << parameters.test-gate >> AWS_REGION_ARTIFACTS: eu-central-1 + COREPACK_ENABLE_DOWNLOAD_PROMPT: '0' working_directory: /tmp/material-ui docker: - image: cimg/node:18.19 @@ -69,34 +68,27 @@ commands: description: 'Set to true if you intend to any browser (for example with playwright).' steps: - - run: - name: Resolve React version - command: | - node scripts/useReactVersion.mjs - # log a patch for maintainers who want to check out this change - git --no-pager diff HEAD - when: condition: << parameters.browsers >> steps: - run: name: Install pnpm package manager command: corepack enable - - run: - name: Prepare playwright hash - command: pnpm list --json --filter playwright > /tmp/playwright_info.json - - store_artifacts: - name: Debug playwright hash - path: /tmp/playwright_info.json - - restore_cache: - name: Restore playwright cache - keys: - - v6-playwright-{{ arch }}-{{ checksum "/tmp/playwright_info.json" }} - when: condition: not: << parameters.browsers >> steps: - # See https://stackoverflow.com/a/73411601 - - run: corepack enable --install-directory ~/bin + - run: + name: Install pnpm package manager + # See https://stackoverflow.com/a/73411601 + command: corepack enable --install-directory ~/bin + + - run: + name: Resolve React version + command: | + node scripts/useReactVersion.mjs + # log a patch for maintainers who want to check out this change + git --no-pager diff HEAD - run: name: View install environment @@ -106,19 +98,6 @@ commands: - run: name: Install js dependencies command: pnpm install - - when: - condition: << parameters.browsers >> - steps: - - run: - name: Install playwright browsers - command: pnpm playwright install --with-deps - - save_cache: - name: Save playwright cache - key: v6-playwright-{{ arch }}-{{ checksum "/tmp/playwright_info.json" }} - paths: - # Keep path in sync with "PLAYWRIGHT_BROWSERS_PATH" - # Can't use environment variables for `save_cache` paths (tested in https://app.circleci.com/pipelines/github/mui/material-ui/37813/workflows/5b1e207f-ac8b-44e7-9ba4-d0f9a01f5c55/jobs/223370) - - /tmp/pw-browsers jobs: checkout: From ad15e08294fb0aabaf1bb2b800363915052d3472 Mon Sep 17 00:00:00 2001 From: MUI bot <2109932+Janpot@users.noreply.github.com> Date: Wed, 25 Sep 2024 16:46:49 +0200 Subject: [PATCH 2/2] Update config.yml --- .circleci/config.yml | 2 -- 1 file changed, 2 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 47601451..93933e38 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -287,8 +287,6 @@ jobs: <<: *default-job docker: - image: mcr.microsoft.com/playwright:v1.43.0-focal - environment: - NODE_ENV: development # Needed if playwright is in `devDependencies` steps: - checkout - install_js: