فینورا پرو - سامانه جامع حسابداری و صدور فاکتور

ci(windows-vm): run actual NSIS v2.0.3 upgrade and native WebView2 checks on ephemeral VM

davoodmehraban89 committed Oct 16, 2026 at 18:00 UTC 3534aa87d01c0efb27c9b9d173e3126ed9f5b002
1 file changed +72
.github/workflows/windows-vm-native-lab.yml new
+72
@@ -0,0 +1,72 @@
1 +name: Phase A Windows VM Native Installer and Upgrade Lab
2 +
3 +on:
4 + pull_request:
5 + paths:
6 + - 'tests/windows-vm-installed-tauri-cdp.cjs'
7 + - 'scripts/windows-vm-native-lab.ps1'
8 + - 'scripts/windows-vm-set-candidate.cjs'
9 + - '.github/workflows/windows-vm-native-lab.yml'
10 + workflow_dispatch:
11 +
12 +permissions:
13 + contents: read
14 +
15 +jobs:
16 + native-windows-lab:
17 + name: Install, login, migrate v6 to v7, verify DPAPI and reinstall
18 + runs-on: windows-latest
19 + timeout-minutes: 75
20 + steps:
21 + - name: Checkout candidate source in disposable Windows runner
22 + uses: actions/checkout@v4
23 + with:
24 + persist-credentials: false
25 + - name: Install Node 22
26 + uses: actions/setup-node@v4
27 + with:
28 + node-version: '22'
29 + cache: npm
30 + - name: Install stable Rust toolchain
31 + uses: dtolnay/rust-toolchain@stable
32 + - name: Install dependencies from committed lockfile
33 + run: npm ci
34 + - name: Run unit and integration regression tests
35 + run: npm test
36 + - name: Generate a non-public higher version for actual NSIS upgrade
37 + id: candidate
38 + run: node scripts/windows-vm-set-candidate.cjs
39 + - name: Build actual Windows x64 NSIS installer
40 + run: npm exec tauri build
41 + - name: Confirm single newly built NSIS installer exists
42 + shell: pwsh
43 + run: |
44 + $files = @(Get-ChildItem 'src-tauri/target/release/bundle/nsis/*x64-setup.exe' -ErrorAction SilentlyContinue)
45 + if ($files.Count -ne 1) { throw 'Expected one actual Tauri NSIS setup EXE' }
46 + $installer = $files[0]
47 + if (!$installer.Name.Contains('${{ steps.candidate.outputs.version }}')) {
48 + throw 'Installer filename/version does not match the disposable candidate'
49 + }
50 + if ($installer.Length -lt 500000) { throw 'Native installer is suspiciously small' }
51 + (Get-FileHash $installer.FullName -Algorithm SHA256) | Format-List
52 + - name: Install released 2.0.3, launch real native WebView2 and upgrade in place
53 + shell: pwsh
54 + run: |
55 + $candidate = @(Get-ChildItem 'src-tauri/target/release/bundle/nsis/*x64-setup.exe')[0].FullName
56 + ./scripts/windows-vm-native-lab.ps1 -CandidateInstaller $candidate -CandidateVersion '${{ steps.candidate.outputs.version }}'
57 + - name: Upload native Windows VM evidence, including failure reports
58 + if: always()
59 + uses: actions/upload-artifact@v4
60 + with:
61 + name: phase-a-native-windows-vm-evidence
62 + path: |
63 + ${{ runner.temp }}/factor-easypro-native-vm-lab/reports/*.json
64 + retention-days: 30
65 + if-no-files-found: warn
66 + - name: State acceptance boundary
67 + if: always()
68 + shell: pwsh
69 + run: |
70 + "This VM lab exercises an actual Windows NSIS installer and installed Tauri WebView2." >> $env:GITHUB_STEP_SUMMARY
71 + "Only synthetic VM data is used. Candidate version is local to CI; no public GitHub Release is created." >> $env:GITHUB_STEP_SUMMARY
72 + "This lab does not replace physical printing, user-machine backup recovery or production signing approval." >> $env:GITHUB_STEP_SUMMARY