uno/.azure-devops-android-tests...

105 строки
2.9 KiB
YAML
Исходник Обычный вид История

2019-07-02 21:44:43 +03:00
jobs:
- job: Android_Build_For_Tests
pool:
vmImage: 'macOS-10.14'
2019-10-24 21:28:08 +03:00
2019-07-02 21:44:43 +03:00
variables:
CI_Build: true
SourceLinkEnabled: false
2019-10-24 21:28:08 +03:00
NUGET_PACKAGES: $(Agent.WorkFolder)/.nuget
2019-07-02 21:44:43 +03:00
steps:
- checkout: self
clean: true
2019-10-24 21:28:08 +03:00
- task: CacheBeta@0
condition: eq(variables['enable_package_cache'], 'true')
2019-10-24 21:28:08 +03:00
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
2019-07-02 21:44:43 +03:00
- bash: /bin/bash -c "sudo $AGENT_HOMEDIRECTORY/scripts/select-xamarin-sdk.sh 5_18_1"
displayName: Select Xamarin Version
- bash: |
$(build.sourcesdirectory)/build/android-uitest-build.sh
displayName: Build Android Test Package
env:
BUILD_SOURCESDIRECTORY: "$(build.sourcesdirectory)"
BUILD_ARTIFACTSTAGINGDIRECTORY: "$(build.artifactstagingdirectory)"
- task: PublishBuildArtifacts@1
condition: always()
inputs:
PathtoPublish: $(build.artifactstagingdirectory)
ArtifactName: uitests-android-build
ArtifactType: Container
- job: Android_Tests
dependsOn: Android_Build_For_Tests
variables:
CI_Build: true
SourceLinkEnabled: false
NUGET_PACKAGES: $(Agent.WorkFolder)/.nuget
pool:
vmImage: 'macOS-10.14'
strategy:
matrix:
# Most tests pass, will be enabled in a later PR
#Android_5.0:
# ANDROID_SIMULATOR_APILEVEL: 21
# UITEST_TEST_MODE_NAME: Automated
Android_9.0:
ANDROID_SIMULATOR_APILEVEL: 28
2019-12-04 21:10:16 +03:00
UITEST_TEST_MODE_NAME: Automated
2019-12-03 21:13:28 +03:00
Android_9.0_Snapshots:
ANDROID_SIMULATOR_APILEVEL: 28
2019-12-04 21:10:16 +03:00
UITEST_TEST_MODE_NAME: Snapshots
2019-12-03 21:13:28 +03:00
UITEST_SNAPSHOTS_ONLY: true
steps:
- checkout: self
clean: true
- task: DownloadBuildArtifacts@0
inputs:
artifactName: uitests-android-build
downloadPath: '$(build.sourcesdirectory)/build'
- bash: /bin/bash -c "sudo $AGENT_HOMEDIRECTORY/scripts/select-xamarin-sdk.sh 5_18_1"
displayName: Select Xamarin Version
- bash: |
$(build.sourcesdirectory)/build/android-uitest-run.sh
2019-07-02 21:44:43 +03:00
displayName: Run Android Tests
2019-07-02 21:44:43 +03:00
env:
BUILD_SOURCESDIRECTORY: "$(build.sourcesdirectory)"
BUILD_ARTIFACTSTAGINGDIRECTORY: "$(build.artifactstagingdirectory)"
ANDROID_SIMULATOR_APILEVEL: $(ANDROID_SIMULATOR_APILEVEL)
2019-12-03 22:58:33 +03:00
UITEST_SNAPSHOTS_ONLY: "$(UITEST_SNAPSHOTS_ONLY)"
2019-07-03 21:25:03 +03:00
- task: PublishTestResults@2
condition: always()
inputs:
2019-12-04 21:10:16 +03:00
testRunTitle: 'Android $(ANDROID_SIMULATOR_APILEVEL) $(UITEST_TEST_MODE_NAME) Test Run'
2019-07-03 21:25:03 +03:00
testResultsFormat: 'NUnit'
testResultsFiles: '$(build.sourcesdirectory)/build/TestResult.xml'
failTaskOnFailedTests: true
2019-07-03 21:25:03 +03:00
- task: PublishBuildArtifacts@1
condition: always()
inputs:
PathtoPublish: $(build.artifactstagingdirectory)
ArtifactName: uitests-results
2019-07-03 21:25:03 +03:00
ArtifactType: Container