|
| 1 | +# Windows Smoke CI — Phase 1 of the phased rollout in docs/designs/WINDOWS_CI.md |
| 2 | +# |
| 3 | +# Answers one question per run: "does the code path through a Windows-critical |
| 4 | +# module actually run on Windows." That's deliberately a lower bar than "does |
| 5 | +# every test pass" — it catches the class of bugs where Linux/macOS CI runs |
| 6 | +# green but a Windows user immediately hits ENOENT / "browse binary not found" |
| 7 | +# / silent mislocations of ~/.gstack/ state. |
| 8 | +# |
| 9 | +# Coverage catch list (see RFC for full reasoning): |
| 10 | +# - Build fails to produce .exe on Windows (catches #1013 / #1024) |
| 11 | +# - Binary-resolution probes wrong filename (catches #1118 / #1094) |
| 12 | +# - Shebang bash script spawn fails (catches #1119) |
| 13 | +# - Sensitive files written without ACL restriction (catches #1121) |
| 14 | +# - { mode: 0o600 } silently ignored on Windows (catches Pre-#1121 state) |
| 15 | +# |
| 16 | +# Miss: #1120-style home-directory fallback — no direct unit test. RFC |
| 17 | +# proposes adding one as a follow-on. |
| 18 | +name: windows-smoke |
| 19 | +on: |
| 20 | + pull_request: |
| 21 | + branches: [main] |
| 22 | + paths: |
| 23 | + - 'browse/**' |
| 24 | + - 'make-pdf/**' |
| 25 | + - 'design/**' |
| 26 | + - 'scripts/**' |
| 27 | + - 'bin/**' |
| 28 | + - 'package.json' |
| 29 | + - 'bun.lockb' |
| 30 | + - '.github/workflows/windows-smoke.yml' |
| 31 | + push: |
| 32 | + branches: [main] |
| 33 | + paths: |
| 34 | + - 'browse/**' |
| 35 | + - 'make-pdf/**' |
| 36 | + - 'design/**' |
| 37 | + - 'scripts/**' |
| 38 | + - 'bin/**' |
| 39 | + - 'package.json' |
| 40 | + - 'bun.lockb' |
| 41 | + workflow_dispatch: |
| 42 | + |
| 43 | +concurrency: |
| 44 | + group: windows-smoke-${{ github.head_ref || github.ref }} |
| 45 | + cancel-in-progress: true |
| 46 | + |
| 47 | +jobs: |
| 48 | + smoke: |
| 49 | + runs-on: windows-latest |
| 50 | + timeout-minutes: 10 |
| 51 | + steps: |
| 52 | + - uses: actions/checkout@v4 |
| 53 | + |
| 54 | + - uses: oven-sh/setup-bun@v2 |
| 55 | + with: |
| 56 | + bun-version: latest |
| 57 | + |
| 58 | + - name: Install dependencies |
| 59 | + run: bun install --frozen-lockfile |
| 60 | + |
| 61 | + - name: Build binaries |
| 62 | + run: bun run build |
| 63 | + |
| 64 | + - name: Assert Windows binary layout |
| 65 | + shell: pwsh |
| 66 | + run: | |
| 67 | + $missing = @() |
| 68 | + foreach ($p in @( |
| 69 | + 'browse/dist/browse.exe', |
| 70 | + 'browse/dist/find-browse.exe', |
| 71 | + 'browse/dist/server-node.mjs', |
| 72 | + 'make-pdf/dist/pdf.exe', |
| 73 | + 'design/dist/design.exe' |
| 74 | + )) { if (-not (Test-Path $p)) { $missing += $p } } |
| 75 | + if ($missing.Count -gt 0) { |
| 76 | + Write-Error "Missing build artifacts: $($missing -join ', ')" |
| 77 | + exit 1 |
| 78 | + } |
| 79 | +
|
| 80 | + - name: Smoke-test binaries |
| 81 | + run: | |
| 82 | + ./browse/dist/browse.exe --version |
| 83 | + ./make-pdf/dist/pdf.exe --version |
| 84 | + ./design/dist/design.exe --version |
| 85 | +
|
| 86 | + - name: Windows-specific unit tests |
| 87 | + run: | |
| 88 | + bun test browse/test/security.test.ts |
| 89 | + bun test browse/test/file-permissions.test.ts |
| 90 | + bun test make-pdf/test/browseClient.test.ts |
| 91 | + bun test make-pdf/test/pdftotext.test.ts |
| 92 | +
|
| 93 | + - name: make-pdf render smoke |
| 94 | + run: bun test make-pdf/test/render.test.ts |
0 commit comments