diff --git a/.circleci/config.yml b/.circleci/config.yml index fbe9117172..8d44619744 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -411,6 +411,15 @@ jobs: steps: - git-checkout - provision + - run: + name: Ensure playwright install + # The base install script always skips playwright browser installs in an attempt + # to be more efficient. When the lockfile has drifted, we may need to install + # playwright again in order to ensure the expected browser version is present. If + # the expected version is present, this should be pretty fast. If it is not it will + # take a moment to install the browsers. + command: | + if ! cmp --silent yarn.lock yarn.lock.base; then npx playwright install; fi; - run: name: Add localhost command: | @@ -556,12 +565,6 @@ workflows: executor: name: docker-build-executor image: cimg/node:16.13-browsers - filters: - branches: - only: - - main - tags: - ignore: /.*/ - build-and-deploy-storybooks: requires: diff --git a/_dev/docker/ci-browsers/Dockerfile b/_dev/docker/ci-browsers/Dockerfile index a892f76704..d7e90019cd 100644 --- a/_dev/docker/ci-browsers/Dockerfile +++ b/_dev/docker/ci-browsers/Dockerfile @@ -5,14 +5,12 @@ FROM cimg/node:16.13-browsers ENV FXA_AUTO_INSTALL=0 -# Install playwright browsers -# One of the biggest culprits of slow install times is playwright since it downloads browser binaries -RUN yarn global add playwright; \ - rm -rf /home/circleci/.cache/ms-playwright/webkit*; \ - rm -rf /home/circleci/.cache/ms-playwright/chromium*; - # Copy over the installed browsers COPY --chown=circleci:circleci ./install /usr/local/bin/. # Copy over the source from the ci-base-latest tag. COPY --chown=circleci:circleci --from=0 /home/circleci/project . + +# Install playwright browsers +# One of the biggest culprits of slow install times is playwright since it downloads browser binaries +RUN npx playwright install firefox;