Skip to content

Commit 3a71d7c

Browse files
authored
Mirror Windows app install logic
1 parent b67aa99 commit 3a71d7c

1 file changed

Lines changed: 18 additions & 1 deletion

File tree

‎.github/workflows/windows_e2e_tests.yml‎

Lines changed: 18 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,24 @@ jobs:
5252
shell: powershell
5353
run: |
5454
Import-Module Appx
55-
.\TransactionProcessor.Mobile/bin/Release\net10.0-windows10.0.19041.0\win-x64\AppPackages\TransactionProcessor.Mobile_1.0.0.1_Test\Install.ps1 -Force
55+
$candidatePaths = @(
56+
(Join-Path $env:GITHUB_WORKSPACE "TransactionProcessor.Mobile\AppPackages"),
57+
(Join-Path $env:GITHUB_WORKSPACE "TransactionProcessor.Mobile\bin\Release\net10.0-windows10.0.19041.0\win-x64\AppPackages")
58+
)
59+
$appPackagesPath = $candidatePaths | Where-Object { Test-Path $_ } | Select-Object -First 1
60+
if ($null -eq $appPackagesPath) {
61+
throw "Unable to find AppPackages under: $($candidatePaths -join ', ')"
62+
}
63+
$installScript = Get-ChildItem -Path $appPackagesPath -Recurse -Filter Install.ps1 | Select-Object -First 1
64+
if ($null -ne $installScript) {
65+
& $installScript.FullName -Force
66+
} else {
67+
$msixPackage = Get-ChildItem -Path $appPackagesPath -Recurse -Filter *.msix | Select-Object -First 1
68+
if ($null -eq $msixPackage) {
69+
throw "Unable to find Install.ps1 or .msix package under $appPackagesPath."
70+
}
71+
Add-AppxPackage -Path $msixPackage.FullName -ForceApplicationShutdown
72+
}
5673
5774
- name: Run Windows End To End Tests
5875
run: dotnet test TransactionProcessor.Mobile.UiTests/TransactionProcessor.Mobile.UiTests.csproj --filter "Category=PRTest&Category=Windows" --no-restore

0 commit comments

Comments
 (0)