48 строки
1.8 KiB
YAML
48 строки
1.8 KiB
YAML
steps:
|
|
# Building APK also requires bundling, this is currently already being done as part of main Android PR task.
|
|
- task: Gradle@2
|
|
displayName: 'gradlew build apk'
|
|
inputs:
|
|
gradleWrapperFile: 'apps/fluent-tester/android/gradlew'
|
|
tasks: 'assembleDebug'
|
|
gradleOptions: '-Xmx2g'
|
|
javaHomeOption: 'JDKVersion'
|
|
jdkVersionOption: '1.11'
|
|
workingDirectory: apps/fluent-tester/android
|
|
|
|
- script: |
|
|
adb install app-debug.apk
|
|
workingDirectory: apps/fluent-tester/android/app/build/outputs/apk/debug
|
|
displayName: 'install apk'
|
|
|
|
# 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 uiautomator2
|
|
workingDirectory: apps/E2E
|
|
displayName: 'Install appium driver'
|
|
condition: succeeded()
|
|
|
|
- script: |
|
|
yarn e2etest:android
|
|
workingDirectory: apps/E2E
|
|
displayName: 'run E2E Android tests [test]'
|
|
condition: succeeded()
|
|
|
|
- template: e2e-publish-artifacts.yml
|
|
parameters:
|
|
applicationType: android
|
|
platform: 'android'
|
|
buildArtifacts: variables['task.Build.status']
|
|
directory: $(Build.SourcesDirectory)/apps/E2E
|