51 lines
1.5 KiB
YAML
51 lines
1.5 KiB
YAML
|
trigger: none
|
||
|
|
||
|
pr:
|
||
|
- master
|
||
|
- release
|
||
|
|
||
|
# Different users have different machine setups, we run the build three times, on ubuntu, osx, and windows
|
||
|
strategy:
|
||
|
matrix:
|
||
|
linux:
|
||
|
imageName: 'ubuntu-latest'
|
||
|
mac:
|
||
|
imageName: "macos-10.15"
|
||
|
windows:
|
||
|
imageName: "windows-2019"
|
||
|
maxParallel: 3
|
||
|
|
||
|
pool:
|
||
|
vmImage: $(imageName)
|
||
|
|
||
|
variables:
|
||
|
currentImage: $(imageName)
|
||
|
codecov: $(CODECOV_TOKEN)
|
||
|
VERSION:
|
||
|
|
||
|
steps:
|
||
|
# Runs 'mvn clean package'
|
||
|
- task: Maven@3
|
||
|
inputs:
|
||
|
mavenPomFile: 'pom.xml'
|
||
|
mavenOptions: '-Xmx3072m'
|
||
|
javaHomeOption: 'JDKVersion'
|
||
|
jdkVersionOption: '1.8'
|
||
|
jdkArchitectureOption: 'x64'
|
||
|
publishJUnitResults: true
|
||
|
testResultsFiles: '**/surefire-reports/TEST-*.xml'
|
||
|
goals: 'package'
|
||
|
|
||
|
# Upload test results to codecov
|
||
|
- script: bash <(curl https://codecov.io/bash) -t $(codecov)
|
||
|
displayName: 'codecov Bash Uploader'
|
||
|
condition: and(eq(variables.currentImage, 'ubuntu-latest'), eq(variables['Build.SourceBranch'], 'refs/heads/master'))
|
||
|
|
||
|
# Publishes the test results to build artifacts.
|
||
|
- task: PublishCodeCoverageResults@1
|
||
|
displayName: 'Publish JaCoCo test results '
|
||
|
inputs:
|
||
|
codeCoverageTool: 'JaCoCo'
|
||
|
summaryFileLocation: '$(System.DefaultWorkingDirectory)/org.hl7.fhir.report/target/site/jacoco-aggregate/jacoco.xml'
|
||
|
reportDirectory: '$(System.DefaultWorkingDirectory)/org.hl7.fhir.report/target/site/jacoco-aggregate/'
|
||
|
condition: and(eq(variables.currentImage, 'ubuntu-latest'), eq(variables['Build.SourceBranch'], 'refs/heads/master'))
|