Skip to content

Commit c35fe18

Browse files
committed
refactor: move scripts files
1 parent 61a12e2 commit c35fe18

File tree

3 files changed

+6
-9
lines changed

3 files changed

+6
-9
lines changed

mithril-client-wasm/analyze-headless-tests-results.sh .github/workflows/scripts/parse-wasm-headless-tests-results.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ if [ ! -e "$FILENAME" ]; then
55
exit 1
66
fi
77

8-
echo "Analyzing headless test results from file: '$FILENAME'"
8+
echo "Parse headless test results from file: '$FILENAME'"
99
if grep -q 'title="FAILED"' "$FILENAME"; then
1010
FAILED_INFO=$(grep -oE '<div id="[^"]+" title="FAILED">([^<]+)' "$FILENAME" | awk 'NR==1 {print substr($0, index($0,$4))}')
1111
echo "$FAILED_INFO"

mithril-client-wasm/run-firefox-headless.py .github/workflows/scripts/run-wasm-tests-firefox-headless.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
driver = webdriver.Firefox(options=options)
99
driver.get("http://localhost:8080/")
1010

11-
# Adjust the timeout to 1 minute
11+
# Adjust the timeout to 3 minutes
1212
wait = WebDriverWait(driver, 180)
1313

1414
# Wait until the div with id "tests_finished" is displayed

.github/workflows/test-client.yml

+4-7
Original file line numberDiff line numberDiff line change
@@ -210,7 +210,6 @@ jobs:
210210
CURRENT_ATTEMPT=$(( ${CURRENT_ATTEMPT} + 1 ))
211211
if nc -z localhost 8080; then
212212
echo "Server is ready."
213-
sleep 5
214213
break
215214
fi
216215
if [ "$CURRENT_ATTEMPT" -ge "$MAX_ATTEMPTS" ]; then
@@ -220,16 +219,14 @@ jobs:
220219
done
221220
222221
- name: Run Chrome headless
223-
working-directory: mithril-client-wasm
224222
shell: bash
225223
run: |
226-
/usr/bin/google-chrome --headless --virtual-time-budget=120000 --dump-dom http://localhost:8080 > chrome-results.html
227-
./analyze-headless-tests-results.sh chrome-results.html
224+
/usr/bin/google-chrome --headless --virtual-time-budget=300000 --dump-dom http://localhost:8080 > chrome-results.html
225+
./.github/workflows/scripts/parse-wasm-headless-tests-results.sh chrome-results.html
228226
229227
- name: Run Firefox headless
230-
working-directory: mithril-client-wasm
231228
shell: bash
232229
run: |
233230
pip install selenium
234-
python3 run-firefox-headless.py
235-
./analyze-headless-tests-results.sh firefox-results.html
231+
python3 ./.github/workflows/scripts/run-wasm-tests-firefox-headless.py
232+
./.github/workflows/scripts/parse-wasm-headless-tests-results.sh firefox-results.html

0 commit comments

Comments
 (0)