78 строки
3.1 KiB
YAML
78 строки
3.1 KiB
YAML
steps:
|
|
- script: |
|
|
yarn bundle
|
|
workingDirectory: apps/windows
|
|
displayName: 'yarn bundle'
|
|
|
|
- script: |
|
|
yarn appium driver install windows
|
|
workingDirectory: apps/windows
|
|
displayName: 'Installing appium windows driver'
|
|
|
|
# WinAppDriver 1.2 is being deployed across MS hosted agents. appium-windows-driver is tied to a specific version of WinAppDriver,
|
|
# failing if a hash is mismatched. The latest current available package supports 1.2rc.
|
|
# Uninstall WinAppDriver 1.2.1 if installed and instead install WinAppDriver 1.1 for now
|
|
- powershell: |
|
|
Invoke-WebRequest https://github.com/microsoft/WinAppDriver/releases/download/v1.1/WindowsApplicationDriver.msi -OutFile $(Agent.TempDirectory)\WinAppDriver.msi
|
|
Start-Process msiexec -ArgumentList "/quiet","/x","{087BBF93-D9E3-4D27-BDBE-9C702E0066FC}" -Verb runAs -Wait
|
|
Start-Process msiexec -ArgumentList "/quiet","/i","$(Agent.TempDirectory)\WinAppDriver.msi" -Verb runAs -Wait
|
|
displayName: Replace WinAppDriver 1.2.99 with WinAppDriver 1.1
|
|
|
|
- task: DownloadSecureFile@1
|
|
name: UwpCertificate
|
|
inputs:
|
|
secureFile: FluentTester_TemporaryKey.pfx
|
|
displayName: 'Download UWP App Certificate'
|
|
|
|
- powershell: |
|
|
certutil –f –p password –importpfx $(UwpCertificate.secureFilePath)
|
|
displayName: 'Add Certificate to Personal Store'
|
|
|
|
- task: DownloadSecureFile@1
|
|
name: AzureCredentials
|
|
inputs:
|
|
secureFile: 'installcredprovider.ps1'
|
|
displayName: 'Download Azure Credentials Plugin for NuGet'
|
|
|
|
- task: PowerShell@2
|
|
inputs:
|
|
filePath: $(AzureCredentials.secureFilePath)
|
|
arguments: '-AddNetfx -Force'
|
|
displayName: 'Install Azure Credentials Plugin for NuGet'
|
|
|
|
- script: |
|
|
yarn prewindows
|
|
workingDirectory: apps\windows
|
|
displayName: 'generate UWP app'
|
|
|
|
- script: |
|
|
yarn windows --arch x64 --logging --no-packager --no-launch
|
|
workingDirectory: apps\windows
|
|
displayName: 'build UWP app'
|
|
|
|
# Creates a variable that determines whether the previous build tasks succeeded.
|
|
# Usage: We want the tasks that generate reports to run for both passing/failing E2E testing tasks. In order to do so, we need to make
|
|
# those reporting tasks run even on when certain previous tasks fail. This variable allows us to differentiate build failures from
|
|
# E2E testing failures. Thus, if this variable != "Success", we know the build failed, and to not run the reporting tasks.
|
|
- task: PowerShell@2
|
|
inputs:
|
|
targetType: 'inline'
|
|
script: |
|
|
Write-Host "##vso[task.setvariable variable=task.Build.status]Success"
|
|
condition: succeeded()
|
|
displayName: 'Create success build variable'
|
|
|
|
- script: |
|
|
yarn e2etest
|
|
workingDirectory: apps\windows
|
|
displayName: 'run E2E UWP tests'
|
|
condition: succeeded()
|
|
|
|
# The following condition (using task.Build.status variable) make it so the reports generate even if the E2E tasks fails,
|
|
# but not if the initial repo build steps fail.
|
|
- template: e2e-publish-artifacts.yml
|
|
parameters:
|
|
applicationType: UWP
|
|
platform: windows
|
|
buildArtifacts: variables['task.Build.status']
|