-
Notifications
You must be signed in to change notification settings - Fork 22
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: add scripts for testing in docker container
- Loading branch information
1 parent
aa4b805
commit 956e9aa
Showing
7 changed files
with
56 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
FROM mcr.microsoft.com/playwright:v1.48.2-jammy | ||
WORKDIR /usr/src/app | ||
RUN cd .. | ||
COPY package*.json ./ | ||
RUN npm ci | ||
COPY . . | ||
RUN rm -r node_modules && \ | ||
npm ci && \ | ||
cd demo && \ | ||
rm -r node_modules && \ | ||
npm ci && \ | ||
cd .. && \ | ||
npx playwright install && \ | ||
npm run build | ||
CMD ["npm", "run", "test"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
#!/bin/bash | ||
|
||
set -e | ||
|
||
source ./playwright/variables.sh | ||
|
||
HOST_COMPONENTS_DIR="/src/components" | ||
|
||
docker build --no-cache -t $IMAGE_NAME -f ./playwright/Dockerfile . && | ||
docker run --rm -v /${PWD}$HOST_COMPONENTS_DIR:$CONTAINER_COMPONENTS_DIR $IMAGE_NAME |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
#!/bin/bash | ||
|
||
set -e | ||
|
||
source ./playwright/variables.sh | ||
|
||
HOST_COMPONENTS_DIR="./src/components" | ||
|
||
docker build --no-cache -t $IMAGE_NAME -f ./playwright/Dockerfile . && | ||
docker run --rm -v $HOST_COMPONENTS_DIR:$CONTAINER_COMPONENTS_DIR $IMAGE_NAME |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
#!/bin/bash | ||
|
||
IMAGE_NAME="playwright-docker" | ||
CONTAINER_COMPONENTS_DIR="/usr/src/app/src/components" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters