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 100%
rename from mithril-client-wasm/run-firefox-headless.py
rename to .github/workflows/scripts/run-wasm-tests-firefox-headless.py
diff --git a/.github/workflows/test-client.yml b/.github/workflows/test-client.yml
index 898a1f5734e..e5e2a751ef8 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
@@ -219,17 +218,15 @@ jobs:
fi
done
- - name: Run Chrome headless
- working-directory: mithril-client-wasm
+ - name: Run Firefox headless
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
+ pip install selenium
+ python3 ./.github/workflows/scripts/run-wasm-tests-firefox-headless.py
+ ./.github/workflows/scripts/parse-wasm-headless-tests-results.sh firefox-results.html
- - name: Run Firefox headless
- working-directory: mithril-client-wasm
+ - name: Run Chrome headless
shell: bash
run: |
- pip install selenium
- python3 run-firefox-headless.py
- ./analyze-headless-tests-results.sh firefox-results.html
+ /usr/bin/google-chrome --headless --virtual-time-budget=120000 --dump-dom http://localhost:8080 > chrome-results.html
+ ./.github/workflows/scripts/parse-wasm-headless-tests-results.sh chrome-results.html