ci(e2e-deno): hopefully made it a bit less flaky

This commit is contained in:
alina 🌸 2024-04-30 05:38:11 +03:00
parent ad9ad041ab
commit ba0fec6340
Signed by: teidesu
SSH key fingerprint: SHA256:uNeCpw6aTSU4aIObXLvHfLkDa82HWH9EiOj9AXOIRpI

View file

@ -45,19 +45,27 @@ case "$method" in
source .env source .env
fi fi
export JSR_URL=http://localhost:4873
if [ ! -z ${DOCKER+x} ]; then if [ ! -z ${DOCKER+x} ]; then
# running behind a socat proxy seems to fix some of the docker networking issues (thx kamillaova) # running behind a socat proxy seems to fix some of the docker networking issues (thx kamillaova)
socat TCP-LISTEN:4873,fork,reuseaddr TCP4:jsr:80 & socat TCP-LISTEN:4873,fork,reuseaddr TCP4:jsr:80 &
socat_pid=$! socat_pid=$!
# run `deno cache` with a few retries to make sure everything is cached
for i in {1..5}; do
if deno cache tests/*.ts; then
break
fi
done
trap "kill $socat_pid" EXIT trap "kill $socat_pid" EXIT
fi fi
export JSR_URL=http://localhost:4873
if [ $# -eq 0 ]; then if [ $# -eq 0 ]; then
deno test -A tests/**/*.ts deno test -A --unstable-ffi tests/**/*.ts
else else
deno test -A $@ deno test -A --unstable-ffi $@
fi fi
;; ;;
"run-docker") "run-docker")