fluentui-android/azure-pipelines-fork-build-...

72 строки
2.6 KiB
YAML

trigger:
batch: true
branches:
include:
- master
pr:
autoCancel: true
branches:
include:
- master
jobs:
- job: BuildTest
pool:
vmImage: ubuntu-latest
steps:
- task: Gradle@3
displayName: "Lint Check"
inputs:
gradleWrapperFile: 'gradlew'
tasks: 'lint'
javaHomeOption: 'JDKVersion'
sonarQubeRunAnalysis: false
spotBugsAnalysis: false
- task: Gradle@3
displayName: "gradlew build"
inputs:
gradleWrapperFile: "gradlew"
tasks: "assembleDevelopmentDebug"
javaHomeOption: "JDKVersion"
jdkVersionOption: "$(jdkVersion)"
- task: Gradle@3
displayName: Unit tests
inputs:
gradleWrapperFile: "gradlew"
tasks: "testDevelopmentDebugUnitTest"
publishJUnitResults: false
javaHomeOption: "JDKVersion"
jdkVersionOption: "17"
sonarQubeRunAnalysis: false
spotBugsAnalysis: false
- task: Gradle@3
displayName: Generate testApk
inputs:
gradleWrapperFile: "gradlew"
tasks: "assembleDevelopmentDebugAndroidTest"
publishJUnitResults: false
javaHomeOption: "JDKVersion"
jdkVersionOption: "$(jdkVersion)"
sonarQubeRunAnalysis: false
spotBugsAnalysis: false
- task: Gradle@3
displayName: Hydra Lab UI test
inputs:
gradleWrapperFile: "gradlew"
tasks: "requestHydraLabTest -PappPath=$(build.sourcesdirectory)/FluentUI.Demo/build/outputs/apk/development/debug/FluentUI.Demo-development-debug.apk -PtestAppPath=$(build.sourcesdirectory)/FluentUI.Demo/build/outputs/apk/androidTest/development/debug/FluentUI.Demo-development-debug-androidTest.apk -PbuildFlavor=$(buildFlavor) -PtestSuiteName=$(testSuiteName) -PrunTimeOutSeconds=$(timeOutSeconds) -PdeviceIdentifier=$(deviceIdentifier) -PgroupTestType=$(groupTestType) -PreportAudience=TestLabOwner -PauthToken=$(authToken) -PpkgName=$(pkgName) -PtestPkgName=$(testPkgName) -PrunningType=$(runningType) -PframeworkType=$(frameworkType) -PhydraLabAPIHost=$(hydraLabAPIHost) -PhydraLabAPISchema=$(hydraLabAPISchema)"
javaHomeOption: "JDKVersion"
jdkVersionOption: "$(jdkVersion)"
publishJUnitResults: true
- task: PublishTestResults@2
displayName: "Publish Test Results"
inputs:
testResultsFiles: "$(build.sourcesdirectory)/build/testResult/**/hydra_result_*.xml"
testRunTitle: "Test-Result"
failTaskOnFailedTests: false