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

ci(a02): fail Windows job on isolated SQL restore helper selftest

davoodmehraban89 committed Oct 30, 2026 at 19:01 UTC 6a6f33b1b9574725e24b6e65f8bb4698c6069132
1 file changed +13
.github/workflows/pr-quality-gates.yml
+13
@@ -61,6 +61,19 @@ jobs:
61 run: npm ci
62 - name: Windows integration regression
63 run: npm test
64 + - name: Guarded SQL restore helper self-test (no SQL, no backup, zero writes)
65 + shell: pwsh
66 + run: |
67 + $result = & powershell.exe -NoProfile -NonInteractive -ExecutionPolicy Bypass -File './scripts/a02-isolated-sql-restore.ps1' -Mode Test
68 + if ($LASTEXITCODE -ne 0) { throw 'A02 isolated restore synthetic self-test failed' }
69 + $report = ($result | Out-String | ConvertFrom-Json)
70 + if ($report.status -ne 'selftest-passed' -or
71 + $report.sqlConnectionOpened -ne $false -or
72 + $report.backupOpened -ne $false -or
73 + $report.databaseModified -ne $false -or
74 + $report.canImport -ne $false) {
75 + throw 'A02 unsafe self-test result'
76 + }
77 - name: Build Tauri installer
78 run: npm exec tauri build
79 - name: Inspect produced Windows x64 installer and checksum