Merge pull request #187 from element-hq/t3chguy/fix-playwright-docker
This commit is contained in:
@@ -6,4 +6,6 @@ WORKDIR /work
|
|||||||
# fonts-dejavu is needed for the same RTL rendering as on CI
|
# fonts-dejavu is needed for the same RTL rendering as on CI
|
||||||
RUN apt-get update && apt-get -y install docker.io fonts-dejavu
|
RUN apt-get update && apt-get -y install docker.io fonts-dejavu
|
||||||
|
|
||||||
ENTRYPOINT ["npx", "playwright", "test", "--update-snapshots", "--reporter", "line"]
|
COPY docker-entrypoint.sh /docker-entrypoint.sh
|
||||||
|
|
||||||
|
ENTRYPOINT ["docker-entrypoint.sh"]
|
||||||
|
|||||||
@@ -0,0 +1,9 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
set -e
|
||||||
|
|
||||||
|
if [[ "$YARN_INSTALL" == "true" ]]; then
|
||||||
|
yarn install --frozen-lockfile
|
||||||
|
fi
|
||||||
|
|
||||||
|
npx playwright test --update-snapshots --reporter line "$@"
|
||||||
@@ -59,7 +59,7 @@ while [[ $# -gt 0 ]]; do
|
|||||||
# It's a volume rather than a directory because otherwise things tend to start picking up
|
# It's a volume rather than a directory because otherwise things tend to start picking up
|
||||||
# files from it in the native environment and break.
|
# files from it in the native environment and break.
|
||||||
--with-node-modules)
|
--with-node-modules)
|
||||||
RUN_ARGS+=(--mount "type=volume,src=ew-docker-node-modules,dst=/work/node_modules,volume-nocopy")
|
RUN_ARGS+=(--mount "type=volume,src=ew-docker-node-modules,dst=/work/node_modules,volume-nocopy" -e YARN_INSTALL=true)
|
||||||
shift
|
shift
|
||||||
;;
|
;;
|
||||||
# Sets a different entrypoint (in which case the default arguments to the script will be ignored)
|
# Sets a different entrypoint (in which case the default arguments to the script will be ignored)
|
||||||
|
|||||||
Reference in New Issue
Block a user