From 5bfecb1a2f87648f50ee40496beac7c697be26ce Mon Sep 17 00:00:00 2001 From: mgmobrien Date: Fri, 13 Feb 2026 18:16:55 -0600 Subject: [PATCH] ci: Add VM runtime fixes for E2E smoke tests - Start Xvfb virtual display before test execution (headless Obsidian) - Clean stale test reports before each run - Install playwright deps before running tests - Fix verdict logic: zero tests executed now correctly reports FAIL These fixes were validated by running the full test-branch.sh pipeline on relay-e2e-linux as the runner user (7 pass, 1 unexpected fail, 1 expected fail). Co-Authored-By: Claude Opus 4.6 --- .github/workflows/e2e-smoke.yml | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-) diff --git a/.github/workflows/e2e-smoke.yml b/.github/workflows/e2e-smoke.yml index f4453f8..9423ca1 100644 --- a/.github/workflows/e2e-smoke.yml +++ b/.github/workflows/e2e-smoke.yml @@ -109,6 +109,15 @@ jobs: set -eo pipefail BRANCH="$1" + # Start virtual display for headless Obsidian + export DISPLAY=:99 + Xvfb :99 -screen 0 1920x1080x24 >/dev/null 2>&1 & + XVFB_PID=$! + sleep 1 + + # Clean stale test reports from previous runs + rm -rf /tmp/test-reports + # Activate GCP service account for gcloud/GCS uploads gcloud auth activate-service-account --key-file="$HOME/ci-sa-key.json" 2>/dev/null @@ -136,6 +145,9 @@ jobs: fi cd ~/relay-harness && git checkout main && git pull + # Install playwright test dependencies + cd ~/relay-harness/playwright && npm install --ignore-scripts 2>/dev/null + # Run tests using the harness test-branch.sh orchestrator export RELAY_PLUGIN_DIR=~/relay-plugin cd ~/relay-harness @@ -157,6 +169,9 @@ jobs: echo '{"reportUrl":"","commit":"","execId":""}' > ~/test-metadata.json fi + # Clean up virtual display + kill $XVFB_PID 2>/dev/null || true + exit $TEST_EXIT REMOTE_SCRIPT @@ -253,6 +268,8 @@ jobs: await core.summary.write(); // Set job status - if ((s.fail || 0) > 0) { + if ((s.total || 0) === 0 || summary.state === 'error') { + core.setFailed('No tests were executed'); + } else if ((s.fail || 0) > 0) { core.setFailed(`${s.fail} test(s) failed`); }