Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

HDS-2577 fix running docker tests in non-default hds-root folder #1454

Merged
merged 1 commit into from
Dec 20, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 2 additions & 5 deletions e2e/docker/run.sh
Original file line number Diff line number Diff line change
@@ -1,13 +1,12 @@

#!/bin/sh
HDS_ROOT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )/../.." &> /dev/null && pwd )"
HDS_DIR_BASENAME="$(basename "$HDS_ROOT_DIR")"

PACKAGE=$1
COMPONENT=$2
COMMAND=""

# PACKAGE=${PACKAGE} COMPONENT=${COMPONENT} yarn update-snapshot:react

# if packaga and component are not provided, run all snapshots
if [ -z "$PACKAGE" ] && [ -z "$COMPONENT" ]; then
COMMAND="yarn start"
Expand All @@ -23,6 +22,4 @@ if [ -n "$PACKAGE" ] && [ -n "$COMPONENT" ]; then
COMMAND="PACKAGE=${PACKAGE} COMPONENT=${COMPONENT} yarn start-component"
fi

docker run -v ${HDS_ROOT_DIR}:/helsinki-design-system -it --rm --ipc=host mcr.microsoft.com/playwright:v1.48.2-jammy /bin/bash -c "cd /helsinki-design-system/e2e && ${COMMAND}"

# --update-snapshots
docker run -v ${HDS_ROOT_DIR}:/${HDS_DIR_BASENAME} -it --rm --ipc=host mcr.microsoft.com/playwright:v1.48.2-jammy /bin/bash -c "cd /${HDS_DIR_BASENAME}/e2e && ${COMMAND}"
7 changes: 2 additions & 5 deletions e2e/docker/update-snapshots.sh
Original file line number Diff line number Diff line change
@@ -1,13 +1,12 @@

#!/bin/sh
HDS_ROOT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )/../.." &> /dev/null && pwd )"
HDS_DIR_BASENAME="$(basename "$HDS_ROOT_DIR")"

PACKAGE=$1
COMPONENT=$2
COMMAND=""

# PACKAGE=${PACKAGE} COMPONENT=${COMPONENT} yarn update-snapshot:react

# if packaga and component are not provided, run all snapshots
if [ -z "$PACKAGE" ] && [ -z "$COMPONENT" ]; then
COMMAND="yarn update-snapshots"
Expand All @@ -23,6 +22,4 @@ if [ -n "$PACKAGE" ] && [ -n "$COMPONENT" ]; then
COMMAND="PACKAGE=${PACKAGE} COMPONENT=${COMPONENT} yarn update-snapshots-component"
fi

docker run -v ${HDS_ROOT_DIR}:/helsinki-design-system -it --rm --ipc=host mcr.microsoft.com/playwright:v1.48.2-jammy /bin/bash -c "cd /helsinki-design-system/e2e && ${COMMAND}"

# --update-snapshots
docker run -v ${HDS_ROOT_DIR}:/${HDS_DIR_BASENAME} -it --rm --ipc=host mcr.microsoft.com/playwright:v1.48.2-jammy /bin/bash -c "cd /${HDS_DIR_BASENAME}/e2e && ${COMMAND}"
Loading