Skip to content

Commit 6ccf8a1

Browse files
Copilotsofthack007
andcommitted
Optimize CI workflow: move Playwright install after boot check and collect serial output
Changes: - Move "Install Playwright browsers" step after boot validation - Saves time if boot check fails (no need to install Playwright) - Playwright only installed if firmware boots successfully - Collect serial output from boot check scenario - Separate serial output (stdout) to boot-check-serial.log - Keep CLI diagnostics (stderr) in boot-check.log - Display both logs on success and failure - Better debugging with separate log streams Benefits: - Faster feedback on boot failures (skip Playwright install) - More comprehensive boot check debugging - Clearer separation of concerns in logs Co-authored-by: softhack007 <[email protected]>
1 parent 326a7e3 commit 6ccf8a1

File tree

1 file changed

+14
-7
lines changed

1 file changed

+14
-7
lines changed

.github/workflows/wokwi-test.yml

Lines changed: 14 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -66,9 +66,6 @@ jobs:
6666
- name: Prepare firmware for Wokwi
6767
run: ./test/wokwi/prepare-firmware.sh esp32_V4_wokwi_debug
6868

69-
- name: Install Playwright browsers
70-
run: npx playwright install --with-deps chromium
71-
7269
- name: Debug - Verify token is set
7370
run: |
7471
if [ -z "$WOKWI_CLI_TOKEN" ]; then
@@ -99,17 +96,24 @@ jobs:
9996
10097
# Run boot check with increased timeout to account for startup time
10198
# Using 30 second timeout for a 15 second scenario to allow for network delays
102-
if wokwi-cli --timeout 30000 --scenario scenarios/boot-check.yaml . > logs/boot-check.log 2>&1; then
99+
# Capture serial output (stdout) and Wokwi CLI diagnostics (stderr) separately
100+
if wokwi-cli --timeout 30000 --scenario scenarios/boot-check.yaml . > logs/boot-check-serial.log 2>logs/boot-check.log; then
103101
echo "✅ Boot check passed - firmware boots without crashes"
104102
echo ""
105-
echo "=== Boot check log (last 100 lines) ==="
106-
tail -100 logs/boot-check.log
103+
echo "=== Boot check serial output (last 50 lines) ==="
104+
tail -50 logs/boot-check-serial.log
105+
echo ""
106+
echo "=== Boot check CLI log (last 50 lines) ==="
107+
tail -50 logs/boot-check.log
107108
else
108109
EXIT_CODE=$?
109110
echo "❌ Boot check failed with exit code $EXIT_CODE"
110111
echo ""
111-
echo "=== Boot check log ==="
112+
echo "=== Boot check CLI log ==="
112113
cat logs/boot-check.log
114+
echo ""
115+
echo "=== Boot check serial output ==="
116+
cat logs/boot-check-serial.log
113117
114118
# Check if it's a WebSocket connection error (code 1006)
115119
if grep -q "code 1006" logs/boot-check.log || grep -q "Connection.*closed" logs/boot-check.log; then
@@ -125,6 +129,9 @@ jobs:
125129
fi
126130
fi
127131
132+
- name: Install Playwright browsers
133+
run: npx playwright install --with-deps chromium
134+
128135
- name: Start Wokwi simulator in background
129136
env:
130137
WOKWI_CLI_TOKEN: ${{ secrets.WOKWI_CLI_TOKEN }}

0 commit comments

Comments
 (0)