Repository navigation
nuget upates #537
Workflow file for this run
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Build and Run Windows Navigation Tests | |
| on: | |
| pull_request: | |
| branches: | |
| - main | |
| jobs: | |
| software_navigation_tests: | |
| runs-on: windows-2022 | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v2 | |
| - name: Setup MSBuild | |
| uses: microsoft/setup-msbuild@v1.1 | |
| with: | |
| vs-prerelease: true | |
| - name: Install MAUI workloads | |
| run: | | |
| dotnet workload install maui | |
| - name: Install Appium and Drivers | |
| run: | | |
| npm install -g appium --unsafe-perm=true --allow-root | |
| appium driver install --source=npm appium-windows-driver | |
| - name: Start Appium Server | |
| run: | | |
| nohup appium --log appium.log & | |
| - name: Restore MAUI App for Windows | |
| run: dotnet restore TransactionProcessor.Mobile.sln --source ${{ secrets.PUBLICFEEDURL }} --source ${{ secrets.PRIVATEFEED_URL }} --source https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet6/nuget/v3/index.json | |
| - name: Build Code | |
| run: dotnet build TransactionProcessor.Mobile/TransactionProcessor.Mobile.csproj -f net10.0-android -c Release --no-restore | |
| - name: Decrypt PFX File | |
| run: | | |
| echo "${{ secrets.WINDOWSSIGNINGCERT }}" > cert.pfx.asc | |
| certutil -decode cert.pfx.asc cert.pfx | |
| - name: Add Cert to Store | |
| run: certutil -user -q -p ${{ secrets.WINDOWSSIGNINGCERTPWD }} -importpfx cert.pfx NoRoot | |
| - name: Publish App | |
| run: | | |
| dotnet publish TransactionProcessor.Mobile/TransactionProcessor.Mobile.csproj -c Release -f net10.0-windows10.0.19041.0 /p:AppxPackageSigningEnabled=true /p:PackageCertificateThumbprint="${{ secrets.WINDOWSSIGNINGCERTTHUMBPRINT }}" | |
| - name: Debug AppPackages contents | |
| shell: powershell | |
| run: | | |
| $candidatePaths = @( | |
| (Join-Path $env:GITHUB_WORKSPACE "TransactionProcessor.Mobile\AppPackages"), | |
| (Join-Path $env:GITHUB_WORKSPACE "TransactionProcessor.Mobile\bin\Release\net10.0-windows10.0.19041.0\win-x64\AppPackages") | |
| ) | |
| $appPackagesPath = $candidatePaths | Where-Object { Test-Path $_ } | Select-Object -First 1 | |
| if ($null -eq $appPackagesPath) { | |
| Write-Error "Unable to find AppPackages under: $($candidatePaths -join ', ')" | |
| exit 1 | |
| } | |
| Write-Host "Listing AppPackages from $appPackagesPath" | |
| Get-ChildItem -Path $appPackagesPath -Recurse | Format-List FullName, Length, Mode | |
| - name: Install App | |
| shell: powershell | |
| run: | | |
| Import-Module Appx | |
| $candidatePaths = @( | |
| (Join-Path $env:GITHUB_WORKSPACE "TransactionProcessor.Mobile\AppPackages"), | |
| (Join-Path $env:GITHUB_WORKSPACE "TransactionProcessor.Mobile\bin\Release\net10.0-windows10.0.19041.0\win-x64\AppPackages") | |
| ) | |
| $appPackagesPath = $candidatePaths | Where-Object { Test-Path $_ } | Select-Object -First 1 | |
| if ($null -eq $appPackagesPath) { | |
| throw "Unable to find AppPackages under: $($candidatePaths -join ', ')" | |
| } | |
| $installScript = Get-ChildItem -Path $appPackagesPath -Recurse -Filter Install.ps1 | Select-Object -First 1 | |
| if ($null -ne $installScript) { | |
| & $installScript.FullName -Force | |
| } else { | |
| $msixPackage = Get-ChildItem -Path $appPackagesPath -Recurse -Filter *.msix | Select-Object -First 1 | |
| if ($null -eq $msixPackage) { | |
| throw "Unable to find Install.ps1 or .msix package under $appPackagesPath." | |
| } | |
| Add-AppxPackage -Path $msixPackage.FullName -ForceApplicationShutdown | |
| } | |
| - name: Run Windows Navigation Tests | |
| run: dotnet test TransactionProcessor.Mobile.UiTests/TransactionProcessor.Mobile.UiTests.csproj --filter "FullyQualifiedName~PageNavigationFeature&Category=Windows" --no-restore | |
| - name: Upload Appium Logs on Failure | |
| if: always() | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: windows-software_navigation_tests_appium | |
| path: appium.log | |