-
Notifications
You must be signed in to change notification settings - Fork 34
/
Copy pathe2e.Dockerfile
29 lines (23 loc) · 1.06 KB
/
e2e.Dockerfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
#----------------------------------------------------------------------------------------------
# Copyright (c) Bentley Systems, Incorporated. All rights reserved.
# Licensed under the MIT License. See LICENSE.md in the project root for license terms.
#----------------------------------------------------------------------------------------------
FROM mcr.microsoft.com/playwright:v1.49.0-noble
ARG PACKAGE_NAME=""
ARG TEST_VIEWER_DIST=""
# Install pnpm
RUN corepack enable
RUN corepack prepare pnpm@9.12.3 --activate
# Copy the local files to the container
WORKDIR /workspaces/viewer-components-react/
COPY /scripts ./scripts
COPY ${TEST_VIEWER_DIST} ./apps/test-viewer/dist
COPY /packages/itwin/${PACKAGE_NAME} ./packages/itwin/${PACKAGE_NAME}
# Switch to the directory where E2E tests will run
WORKDIR ./packages/itwin/${PACKAGE_NAME}
# Install dependencies
RUN pnpm install -D --filter .
RUN npx playwright install chromium
# Set the entry point to run the tests
ENV TEST_VIEWER_DIST=/workspaces/viewer-components-react/apps/test-viewer/dist
CMD ["npm", "run", "test:e2e:local"]