From 31dde462c7c2aca8510e2cfcae019a8f72449cc9 Mon Sep 17 00:00:00 2001 From: Jan Potoms <2109932+Janpot@users.noreply.github.com> Date: Fri, 27 Sep 2024 09:56:44 +0200 Subject: [PATCH] [code-infra] Remove custom playwright installation steps (#14728) --- .circleci/config.yml | 44 ++++++-------------------------------------- 1 file changed, 6 insertions(+), 38 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 4ae6693ce1fcc..c1146e554f239 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -29,11 +29,10 @@ 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 >> + COREPACK_ENABLE_DOWNLOAD_PROMPT: '0' working_directory: /tmp/mui docker: - image: cimg/node:20.17 @@ -64,24 +63,15 @@ commands: 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" }} + command: corepack enable - 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: View install environment @@ -107,20 +97,6 @@ commands: name: Install @mui/material@next command: pnpm use-material-ui-v6 - - when: - condition: << parameters.browsers >> - steps: - - run: - name: Install playwright browsers - command: npx 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: <<: *default-job @@ -239,8 +215,6 @@ jobs: <<: *default-job docker: - image: mcr.microsoft.com/playwright:v1.44.1-focal - environment: - NODE_ENV: development # Needed if playwright is in `devDependencies` steps: - checkout - install_js: @@ -272,8 +246,6 @@ jobs: <<: *default-job docker: - image: mcr.microsoft.com/playwright:v1.44.1-focal - environment: - NODE_ENV: development # Needed if playwright is in `devDependencies` steps: - checkout - install_js: @@ -285,8 +257,6 @@ jobs: <<: *default-job docker: - image: mcr.microsoft.com/playwright:v1.44.1-focal - environment: - NODE_ENV: development # Needed if playwright is in `devDependencies` steps: - checkout - install_js: @@ -300,8 +270,6 @@ jobs: <<: *default-job docker: - image: mcr.microsoft.com/playwright:v1.44.1-focal - environment: - NODE_ENV: development # Needed if playwright is in `devDependencies` steps: - checkout - install_js: