Skip to content

Doubao-powered voice input for Linux, Wayland and Omarchy

fix(workflow): show Omarchy image on main CI summary (#21)

Leyang4f8ba0177263
diff --git a/.github/workflows/midscene-omarchy-4.0.3.yml b/.github/workflows/midscene-omarchy-4.0.3.yml
index 9f37ed3..951a606 100644
--- a/.github/workflows/midscene-omarchy-4.0.3.yml
+++ b/.github/workflows/midscene-omarchy-4.0.3.yml
@@ -8,7 +8,7 @@ on:
- ".github/workflows/midscene-omarchy-4.0.3.yml"
- ".github/workflows/deploy-midscene-report.yml"
- "scripts/build-pages-report.mjs"
- - "scripts/build-omarchy-summary.mjs"
+ - "scripts/verify-omarchy-evidence.mjs"
- "scripts/omarchy-shell-evidence.mjs"
- "tests/test_pages_report_history.mjs"
- "tests/midscene/package.json"
@@ -31,7 +31,7 @@ on:
- ".github/workflows/midscene-omarchy-4.0.3.yml"
- ".github/workflows/deploy-midscene-report.yml"
- "scripts/build-pages-report.mjs"
- - "scripts/build-omarchy-summary.mjs"
+ - "scripts/verify-omarchy-evidence.mjs"
- "scripts/omarchy-shell-evidence.mjs"
- "tests/test_pages_report_history.mjs"
- "tests/midscene/package.json"
@@ -152,11 +152,9 @@ jobs:
if-no-files-found: warn
retention-days: 7
- - name: Show visual results on the CI run page
+ - name: Verify visual evidence before publishing
if: success()
- env:
- REPORT_ARTIFACT_URL: ${{ steps.report.outputs.artifact-url }}
- run: node scripts/build-omarchy-summary.mjs tests/midscene/midscene_run
+ run: node scripts/verify-omarchy-evidence.mjs tests/midscene/midscene_run
pages-report:
name: GitHub Pages report
@@ -174,3 +172,22 @@ jobs:
with:
artifact-name: omarchy-midscene-e2e-report
report-label: Omarchy 4.0.3
+
+ showcase-summary:
+ name: Visual report on CI page
+ needs: pages-report
+ if: needs.pages-report.result == 'success'
+ runs-on: ubuntu-latest
+ steps:
+ - name: Show the real desktop and native Test report
+ env:
+ REPORT_BASE: https://${{ github.repository_owner }}.github.io/${{ github.event.repository.name }}/reports/${{ github.run_id }}
+ run: |
+ cat >> "$GITHUB_STEP_SUMMARY" <<EOF
+ # Omarchy × Midscene · 3/3 visual checks passed
+
+ [![Real Omarchy system menu with a focused row and readable Shutdown item]($REPORT_BASE/menu.jpg)]($REPORT_BASE/index.html)
+
+ **Click the desktop screenshot to inspect the native Midscene Test report.**
+ [Onboarding replay]($REPORT_BASE/onboarding-report.html) · [Report history](https://${{ github.repository_owner }}.github.io/${{ github.event.repository.name }}/)
+ EOF
diff --git a/scripts/build-omarchy-summary.mjs b/scripts/build-omarchy-summary.mjs
deleted file mode 100644
index 1c3f786..0000000
--- a/scripts/build-omarchy-summary.mjs
+++ /dev/null
@@ -1,36 +0,0 @@
-#!/usr/bin/env node
-
-import { appendFile } from 'node:fs/promises';
-import { findShellReport } from './omarchy-shell-evidence.mjs';
-
-const reportDirectory = process.argv[2];
-const summaryFile = process.env.GITHUB_STEP_SUMMARY;
-if (!reportDirectory || !summaryFile) {
- throw new Error(
- 'Usage: GITHUB_STEP_SUMMARY=... node scripts/build-omarchy-summary.mjs REPORT_DIR',
- );
-}
-
-const { checks } = await findShellReport(reportDirectory);
-const passed = checks.filter((check) => check.passed).length;
-const runUrl = `${process.env.GITHUB_SERVER_URL}/${process.env.GITHUB_REPOSITORY}/actions/runs/${process.env.GITHUB_RUN_ID}`;
-const artifactUrl = process.env.REPORT_ARTIFACT_URL || runUrl;
-
-await appendFile(
- summaryFile,
- `# Omarchy × Midscene · real desktop visual test
-
-### ${passed}/${checks.length} visual assertions passed in Omarchy 4.0.3 / Hyprland
-
-| Scene | Visible result | Midscene |
-| --- | --- | --- |
-${checks.map((check) => `| ${check.label} | ${check.passed ? '✅ Passed' : '❌ Failed'} | VLM screenshot assertion |`).join('\n')}
-
-**Real VM:** official Omarchy ISO → KVM → Hyprland/Wayland → VNC → Midscene on X11.
-**Evidence:** [Download the complete interactive HTML replay](${artifactUrl}) · [Open CI run](${runUrl}).
-
-The replay contains the actual desktop screenshots, model judgments, and step timeline. The GitHub Pages job publishes a browser-ready showcase for successful main-branch runs.
-`,
-);
-
-if (passed !== checks.length) process.exitCode = 1;
diff --git a/scripts/verify-omarchy-evidence.mjs b/scripts/verify-omarchy-evidence.mjs
new file mode 100644
index 0000000..9e22f77
--- /dev/null
+++ b/scripts/verify-omarchy-evidence.mjs
@@ -0,0 +1,15 @@
+#!/usr/bin/env node
+
+import { findShellReport } from './omarchy-shell-evidence.mjs';
+
+const reportDirectory = process.argv[2];
+if (!reportDirectory) {
+ throw new Error('Usage: node scripts/verify-omarchy-evidence.mjs REPORT_DIR');
+}
+
+const { checks } = await findShellReport(reportDirectory);
+const failed = checks.filter((check) => !check.passed);
+console.log(`${checks.length - failed.length}/${checks.length} Omarchy visual assertions passed`);
+if (failed.length) {
+ throw new Error(`Failed visual assertions: ${failed.map((check) => check.label).join(', ')}`);
+}