Skip to content

Commit

Permalink
[code-infra] Remove custom playwright installation steps (#43881)
Browse files Browse the repository at this point in the history
  • Loading branch information
Janpot authored Sep 27, 2024
1 parent a0cf344 commit 34b7684
Showing 1 changed file with 6 additions and 56 deletions.
62 changes: 6 additions & 56 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:20.17
Expand Down Expand Up @@ -74,25 +73,15 @@ commands:
steps:
- run:
name: Install pnpm package manager
command: |
corepack enable
corepack prepare pnpm@latest-8 --activate
- 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
Expand All @@ -110,19 +99,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:
Expand Down Expand Up @@ -394,8 +370,6 @@ jobs:
resource_class: 'medium+'
docker:
- image: mcr.microsoft.com/playwright:v1.47.1-focal
environment:
NODE_ENV: development # Needed if playwright is in `devDependencies`
steps:
- checkout
- install_js:
Expand Down Expand Up @@ -424,8 +398,6 @@ jobs:
<<: *default-job
docker:
- image: mcr.microsoft.com/playwright:v1.47.1-focal
environment:
NODE_ENV: development # Needed if playwright is in `devDependencies`
steps:
- checkout
- install_js:
Expand All @@ -438,8 +410,6 @@ jobs:
<<: *default-job
docker:
- image: mcr.microsoft.com/playwright:v1.47.1-focal
environment:
NODE_ENV: development # Needed if playwright is in `devDependencies`
steps:
- checkout
- install_js:
Expand All @@ -453,8 +423,6 @@ jobs:
<<: *default-job
docker:
- image: mcr.microsoft.com/playwright:v1.47.1-focal
environment:
NODE_ENV: development # Needed if playwright is in `devDependencies`
steps:
- checkout
- install_js:
Expand All @@ -480,8 +448,6 @@ jobs:
<<: *default-job
docker:
- image: mcr.microsoft.com/playwright:v1.47.1-focal
environment:
NODE_ENV: development # Needed if playwright is in `devDependencies`
steps:
- checkout
- install_js:
Expand Down Expand Up @@ -540,8 +506,6 @@ jobs:
working_directory: /tmp/material-ui/test/bundling/fixtures/next-webpack4/
docker:
- image: mcr.microsoft.com/playwright:v1.47.1-focal
environment:
NODE_ENV: development # Needed if playwright is in `devDependencies`
steps:
- checkout:
path: /tmp/material-ui
Expand All @@ -564,8 +528,6 @@ jobs:
working_directory: /tmp/material-ui/test/bundling/fixtures/next-webpack5/
docker:
- image: mcr.microsoft.com/playwright:v1.47.1-focal
environment:
NODE_ENV: development # Needed if playwright is in `devDependencies`
steps:
- checkout:
path: /tmp/material-ui
Expand All @@ -588,8 +550,6 @@ jobs:
working_directory: /tmp/material-ui/test/bundling/fixtures/create-react-app/
docker:
- image: mcr.microsoft.com/playwright:v1.47.1-focal
environment:
NODE_ENV: development # Needed if playwright is in `devDependencies`
steps:
- checkout:
path: /tmp/material-ui
Expand All @@ -612,8 +572,6 @@ jobs:
working_directory: /tmp/material-ui/test/bundling/fixtures/snowpack/
docker:
- image: mcr.microsoft.com/playwright:v1.47.1-focal
environment:
NODE_ENV: development # Needed if playwright is in `devDependencies`
steps:
- checkout:
path: /tmp/material-ui
Expand All @@ -636,8 +594,6 @@ jobs:
working_directory: /tmp/material-ui/test/bundling/fixtures/vite/
docker:
- image: mcr.microsoft.com/playwright:v1.47.1-focal
environment:
NODE_ENV: development # Needed if playwright is in `devDependencies`
steps:
- checkout:
path: /tmp/material-ui
Expand All @@ -660,8 +616,6 @@ jobs:
working_directory: /tmp/material-ui/test/bundling/fixtures/esbuild/
docker:
- image: mcr.microsoft.com/playwright:v1.47.1-focal
environment:
NODE_ENV: development # Needed if playwright is in `devDependencies`
steps:
- checkout:
path: /tmp/material-ui
Expand All @@ -688,8 +642,6 @@ jobs:
working_directory: /tmp/material-ui/test/bundling/fixtures/gatsby/
docker:
- image: mcr.microsoft.com/playwright:v1.47.1-focal
environment:
NODE_ENV: development # Needed if playwright is in `devDependencies`
steps:
- checkout:
path: /tmp/material-ui
Expand Down Expand Up @@ -789,8 +741,6 @@ jobs:
<<: *default-job
docker:
- image: mcr.microsoft.com/playwright:v1.47.1-focal
environment:
NODE_ENV: development # Needed if playwright is in `devDependencies`
steps:
- checkout
- install_js:
Expand Down

0 comments on commit 34b7684

Please sign in to comment.