fluentui-react-native/.ado/templates/e2e-testing-win32.yml

46 строки
2.1 KiB
YAML

steps:
- script: |
yarn bundle
workingDirectory: apps/win32
displayName: 'yarn bundle'
# 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
# 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 appium driver install --source=npm appium-windows-driver
workingDirectory: apps/E2E
displayName: 'Install appium driver'
condition: succeeded()
- script: |
yarn e2etest:win32
workingDirectory: apps/E2E
displayName: 'run E2E Win32 tests [test]'
condition: succeeded()
- template: e2e-publish-artifacts.yml
parameters:
applicationType: win32
platform: 'win32'
buildArtifacts: variables['task.Build.status']
directory: $(Build.SourcesDirectory)/apps/E2E