bug(CI): Fixes the playwright install in the base image used for functional tests.

Because:
- Playwright tests weren't running

This Commit:
- Switches from to an npx install to setup the playwright browsers
This commit is contained in:
dschom 2022-12-20 12:18:25 -08:00
Родитель 37f5f7d4ea
Коммит 74d474389c
Не найден ключ, соответствующий данной подписи
Идентификатор ключа GPG: F26AEE99174EE68B
2 изменённых файлов: 13 добавлений и 12 удалений

Просмотреть файл

@ -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:

Просмотреть файл

@ -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;