diff --git a/mithril-client-wasm/analyze-headless-tests-results.sh b/.github/workflows/scripts/parse-wasm-headless-tests-results.sh
similarity index 90%
rename from mithril-client-wasm/analyze-headless-tests-results.sh
rename to .github/workflows/scripts/parse-wasm-headless-tests-results.sh
index 8a2671d86dd..e4288ef37d2 100755
--- a/mithril-client-wasm/analyze-headless-tests-results.sh
+++ b/.github/workflows/scripts/parse-wasm-headless-tests-results.sh
@@ -5,7 +5,7 @@ if [ ! -e "$FILENAME" ]; then
exit 1
fi
-echo "Analyzing headless test results from file: '$FILENAME'"
+echo "Parse headless test results from file: '$FILENAME'"
if grep -q 'title="FAILED"' "$FILENAME"; then
FAILED_INFO=$(grep -oE '
([^<]+)' "$FILENAME" | awk 'NR==1 {print substr($0, index($0,$4))}')
echo "$FAILED_INFO"
diff --git a/mithril-client-wasm/run-firefox-headless.py b/.github/workflows/scripts/run-wasm-tests-firefox-headless.py
similarity index 95%
rename from mithril-client-wasm/run-firefox-headless.py
rename to .github/workflows/scripts/run-wasm-tests-firefox-headless.py
index a388b97c743..bea08da1b5d 100755
--- a/mithril-client-wasm/run-firefox-headless.py
+++ b/.github/workflows/scripts/run-wasm-tests-firefox-headless.py
@@ -8,7 +8,7 @@
driver = webdriver.Firefox(options=options)
driver.get("http://localhost:8080/")
-# Adjust the timeout to 1 minute
+# Adjust the timeout to 3 minutes
wait = WebDriverWait(driver, 180)
# Wait until the div with id "tests_finished" is displayed
diff --git a/.github/workflows/test-client.yml b/.github/workflows/test-client.yml
index 898a1f5734e..cb6dd1df6ac 100644
--- a/.github/workflows/test-client.yml
+++ b/.github/workflows/test-client.yml
@@ -210,7 +210,6 @@ jobs:
CURRENT_ATTEMPT=$(( ${CURRENT_ATTEMPT} + 1 ))
if nc -z localhost 8080; then
echo "Server is ready."
- sleep 5
break
fi
if [ "$CURRENT_ATTEMPT" -ge "$MAX_ATTEMPTS" ]; then
@@ -220,16 +219,14 @@ jobs:
done
- name: Run Chrome headless
- working-directory: mithril-client-wasm
shell: bash
run: |
- /usr/bin/google-chrome --headless --virtual-time-budget=120000 --dump-dom http://localhost:8080 > chrome-results.html
- ./analyze-headless-tests-results.sh chrome-results.html
+ /usr/bin/google-chrome --headless --virtual-time-budget=180000 --dump-dom http://localhost:8080 > chrome-results.html
+ ./.github/workflows/scripts/parse-wasm-headless-tests-results.sh chrome-results.html
- name: Run Firefox headless
- working-directory: mithril-client-wasm
shell: bash
run: |
pip install selenium
- python3 run-firefox-headless.py
- ./analyze-headless-tests-results.sh firefox-results.html
+ python3 ./.github/workflows/scripts/run-wasm-tests-firefox-headless.py
+ ./.github/workflows/scripts/parse-wasm-headless-tests-results.sh firefox-results.html