uno/.azure-devops-ios-tests.yml

55 строки
1.7 KiB
YAML

jobs:
- job: iOS_Tests
variables:
CI_Build: true
SourceLinkEnabled: false
NUGET_PACKAGES: $(Pipeline.Workspace)/.nuget/packages
XCODE_ROOT: /Applications/Xcode_10.3.app
pool:
vmImage: 'macOS-10.14'
steps:
- checkout: self
clean: true
- task: CacheBeta@0
condition: eq(variables['enable_package_cache'], 'true')
inputs:
key: nuget | $(Agent.OS) | $(Agent.JobName) | $(build.sourcesdirectory)/**/*.csproj | $(build.sourcesdirectory)/**/Directory.Build.targets | $(build.sourcesdirectory)/**/Directory.Build.props
path: $(NUGET_PACKAGES)
displayName: Cache NuGet packages
- bash: /bin/bash -c "sudo $AGENT_HOMEDIRECTORY/scripts/select-xamarin-sdk.sh 5_18_1"
displayName: Select Xamarin Version
- bash: /bin/bash -c "echo '##vso[task.setvariable variable=MD_APPLE_SDK_ROOT;]'${XCODE_ROOT};sudo xcode-select --switch ${XCODE_ROOT}/Contents/Developer"
displayName: Select Xcode
- bash: |
chmod +x $(build.sourcesdirectory)/build/ios-uitest-run.sh
$(build.sourcesdirectory)/build/ios-uitest-run.sh
displayName: Build and Run iOS Tests
env:
BUILD_SOURCESDIRECTORY: "$(build.sourcesdirectory)"
BUILD_ARTIFACTSTAGINGDIRECTORY: "$(build.artifactstagingdirectory)"
- task: PublishTestResults@2
condition: always()
inputs:
testRunTitle: 'iOS Test Run'
testResultsFormat: 'NUnit'
testResultsFiles: '$(build.sourcesdirectory)/build/TestResult.xml'
failTaskOnFailedTests: true
- task: PublishBuildArtifacts@1
condition: always()
inputs:
PathtoPublish: $(build.artifactstagingdirectory)
ArtifactName: uitests-results
ArtifactType: Container