2023-06-08 21:56:17 +00:00
|
|
|
# syntax=docker/dockerfile:1
|
|
|
|
|
|
|
|
# Copied since we won't have the repo to use if expanding from cache.
|
|
|
|
|
|
|
|
# Workaround: https://github.com/docker/cli/issues/996
|
|
|
|
ARG BASE_IMAGE=node-js-libp2p-head
|
|
|
|
FROM ${BASE_IMAGE} as js-libp2p-base
|
|
|
|
|
|
|
|
FROM mcr.microsoft.com/playwright
|
|
|
|
|
|
|
|
|
|
|
|
COPY --from=js-libp2p-base /app/ /app/
|
|
|
|
WORKDIR /app/interop
|
2023-07-14 18:48:08 +00:00
|
|
|
# We install browsers here instead of the cached version so that we use the latest browsers at run time.
|
|
|
|
# Ideally this would also be pinned, but playwright controls this, so there isn't much we can do about it.
|
|
|
|
# By installing here, we avoid installing it at test time.
|
2023-08-10 03:04:43 +00:00
|
|
|
RUN npx playwright install
|
2023-06-08 21:56:17 +00:00
|
|
|
ARG BROWSER=chromium # Options: chromium, firefox, webkit
|
|
|
|
ENV BROWSER=$BROWSER
|
|
|
|
|
|
|
|
ENTRYPOINT npm test -- --build false --types false -t browser -- --browser $BROWSER
|