2019-07-02 21:44:43 +03:00
|
|
|
jobs:
|
|
|
|
|
2019-11-08 18:53:56 +03:00
|
|
|
- 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
|
2019-11-14 14:38:29 +03:00
|
|
|
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: |
|
2019-11-08 18:53:56 +03:00
|
|
|
$(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:
|
2019-12-05 04:29:59 +03:00
|
|
|
# Most tests pass, will be enabled in a later PR
|
|
|
|
#Android_5.0:
|
|
|
|
# ANDROID_SIMULATOR_APILEVEL: 21
|
|
|
|
# UITEST_TEST_MODE_NAME: Automated
|
2019-11-08 18:53:56 +03:00
|
|
|
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
|
2019-11-08 18:53:56 +03:00
|
|
|
|
|
|
|
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: |
|
2019-07-03 17:22:01 +03:00
|
|
|
$(build.sourcesdirectory)/build/android-uitest-run.sh
|
2019-07-02 21:44:43 +03:00
|
|
|
|
2019-07-03 17:22:01 +03:00
|
|
|
displayName: Run Android Tests
|
2019-07-02 21:44:43 +03:00
|
|
|
|
2019-07-03 17:22:01 +03:00
|
|
|
env:
|
|
|
|
BUILD_SOURCESDIRECTORY: "$(build.sourcesdirectory)"
|
|
|
|
BUILD_ARTIFACTSTAGINGDIRECTORY: "$(build.artifactstagingdirectory)"
|
2019-11-08 18:53:56 +03:00
|
|
|
ANDROID_SIMULATOR_APILEVEL: $(ANDROID_SIMULATOR_APILEVEL)
|
2019-12-03 22:58:33 +03:00
|
|
|
UITEST_SNAPSHOTS_ONLY: "$(UITEST_SNAPSHOTS_ONLY)"
|
2019-09-26 19:40:06 +03:00
|
|
|
|
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'
|
2019-09-30 16:49:26 +03:00
|
|
|
failTaskOnFailedTests: true
|
2019-07-03 21:25:03 +03:00
|
|
|
|
|
|
|
- task: PublishBuildArtifacts@1
|
|
|
|
condition: always()
|
|
|
|
inputs:
|
|
|
|
PathtoPublish: $(build.artifactstagingdirectory)
|
2019-07-09 21:52:37 +03:00
|
|
|
ArtifactName: uitests-results
|
2019-07-03 21:25:03 +03:00
|
|
|
ArtifactType: Container
|