Skip to content

Commit 73a959a

Browse files
MSchmoeckerelikoga
authored andcommitted
fix: aquire unique enough port
1 parent d0914e7 commit 73a959a

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

.github/npm_test_integration.sh

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,11 @@ set -euo pipefail
33
OUR_NIX=$(readlink -f $(which nix))
44
OUR_NIX_PARENT=$(dirname $OUR_NIX)
55
TEE=$(which tee)
6+
PYTHON=$(which python)
67
OLD_PATH=$PATH
78
export PATH=$OUR_NIX_PARENT
8-
$OUR_NIX develop .#forNpmTesting --command npm run test:integration "$@" 2>&1 | $TEE output.log
9+
UVICORN_PORT=$($PYTHON -c 'import socket; s=socket.socket(); s.bind(("", 0)); print(s.getsockname()[1]); s.close()')
10+
UVICORN_PORT=$UVICORN_PORT $OUR_NIX develop .#forNpmTesting --command npm run test:integration "$@" 2>&1 | $TEE output.log
911
export PATH=$OLD_PATH
1012
PLAYWRIGHT_EXIT_CODE=$?
1113
if grep -q -e "Error: A snapshot doesn't exist at" -e "Screenshot comparison failed" output.log; then

0 commit comments

Comments
 (0)