Merge pull request 'ci(windows-smoke): update over the running app, as the auto-updater does (#1)' (#42) from ci/smoke-update-over-running into main
Build Lotus Chat Desktop / prepare (push) Successful in 1m2s
Build Lotus Chat Desktop / build-windows (push) Successful in 30m1s
Build Lotus Chat Desktop / build-linux (push) Successful in 30m40s
Build Lotus Chat Desktop / build-arch (push) Successful in 1m3s
Build Lotus Chat Desktop / update-manifest (push) Successful in 3s
Build Lotus Chat Desktop / checksums (push) Successful in 28s
Build Lotus Chat Desktop / prepare (push) Successful in 1m2s
Build Lotus Chat Desktop / build-windows (push) Successful in 30m1s
Build Lotus Chat Desktop / build-linux (push) Successful in 30m40s
Build Lotus Chat Desktop / build-arch (push) Successful in 1m3s
Build Lotus Chat Desktop / update-manifest (push) Successful in 3s
Build Lotus Chat Desktop / checksums (push) Successful in 28s
This commit was merged in pull request #42.
This commit is contained in:
@@ -5,7 +5,8 @@
|
||||
# (playwright-core over CDP): boots to the login screen, local server address,
|
||||
# microphone permission for the app and not for a foreign page, the call page's
|
||||
# own origin + isolation, the Credential Manager round trip. Features a build
|
||||
# doesn't have are reported "n/a".
|
||||
# doesn't have are reported "n/a". Then it updates the app while it is running,
|
||||
# the way the auto-updater does (#1).
|
||||
#
|
||||
# Run it from the Actions tab (workflow_dispatch):
|
||||
# - no `ref`: tests the published nightly installer (a couple of minutes);
|
||||
@@ -121,6 +122,39 @@ jobs:
|
||||
try { (Invoke-WebRequest -UseBasicParsing http://localhost:44548/ -TimeoutSec 5).StatusCode | Write-Host } catch { Write-Host "44548: $($_.Exception.Message)" }
|
||||
node smoke-deps\windows-smoke.mjs smoke-out
|
||||
|
||||
# cinny-desktop #1: an auto-update over the RUNNING app. tauri-plugin-updater
|
||||
# starts the installer in passive update mode (/P /UPDATE) and the app then
|
||||
# exits; if it was slow to let go of cinny.exe, NSIS stopped on "Error opening
|
||||
# file for writing". The installer's pre-install hook (src-tauri/nsis/
|
||||
# hooks.nsh) now waits for the file to be writable. Here the app stays up 3 s
|
||||
# after the installer starts, then goes. Pass = the installer finishes on its
|
||||
# own (no dialog), exits 0, and has rewritten cinny.exe (its timestamp was set
|
||||
# to 2000 first; NSIS writes the build's own timestamp back).
|
||||
- name: Update over the running app (#1)
|
||||
shell: powershell
|
||||
run: |
|
||||
Get-Process cinny -ErrorAction SilentlyContinue | Stop-Process -Force
|
||||
$app = Join-Path $env:LOCALAPPDATA 'Lotus Chat\cinny.exe'
|
||||
(Get-Item $app).LastWriteTime = Get-Date '2000-01-01'
|
||||
Start-Process $app
|
||||
Start-Sleep -Seconds 10
|
||||
if (-not (Get-Process cinny -ErrorAction SilentlyContinue)) { Write-Error 'app did not start'; exit 1 }
|
||||
$inst = Start-Process smoke-installer\setup.exe -ArgumentList '/P', '/UPDATE' -PassThru
|
||||
Start-Sleep -Seconds 3
|
||||
Get-Process cinny -ErrorAction SilentlyContinue | Stop-Process -Force
|
||||
if (-not $inst.WaitForExit(90000)) {
|
||||
Write-Host '--- windows with a title (an error dialog would be here)'
|
||||
Get-Process | Where-Object { $_.MainWindowTitle } | Select-Object Name, MainWindowTitle | Format-Table | Out-String | Write-Host
|
||||
$inst | Stop-Process -Force
|
||||
Write-Error 'installer did not finish within 90 s (stuck on a dialog?)'
|
||||
exit 1
|
||||
}
|
||||
$written = (Get-Item $app).LastWriteTime
|
||||
Write-Host "installer exit code $($inst.ExitCode); cinny.exe timestamp now $written"
|
||||
if ($inst.ExitCode -ne 0) { Write-Error "installer exit code $($inst.ExitCode)"; exit 1 }
|
||||
if ($written -lt (Get-Date '2001-01-01')) { Write-Error 'cinny.exe was not rewritten'; exit 1 }
|
||||
Get-Process cinny -ErrorAction SilentlyContinue | Stop-Process -Force
|
||||
|
||||
- name: Stop the app
|
||||
if: ${{ always() }}
|
||||
shell: powershell
|
||||
|
||||
Reference in New Issue
Block a user