From ba0fec6340805da11106d28baeb23c84bb3a2d20 Mon Sep 17 00:00:00 2001 From: alina sireneva Date: Tue, 30 Apr 2024 05:38:11 +0300 Subject: [PATCH] ci(e2e-deno): hopefully made it a bit less flaky --- e2e/deno/cli.sh | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/e2e/deno/cli.sh b/e2e/deno/cli.sh index 07c64d6a..79c7c8ff 100755 --- a/e2e/deno/cli.sh +++ b/e2e/deno/cli.sh @@ -45,19 +45,27 @@ case "$method" in source .env fi + export JSR_URL=http://localhost:4873 + if [ ! -z ${DOCKER+x} ]; then # 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_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 fi - export JSR_URL=http://localhost:4873 if [ $# -eq 0 ]; then - deno test -A tests/**/*.ts + deno test -A --unstable-ffi tests/**/*.ts else - deno test -A $@ + deno test -A --unstable-ffi $@ fi ;; "run-docker")