CodeAnalysis/azure-pipelines.yml

61 строка
1.6 KiB
YAML

# https://docs.microsoft.com/en-us/azure/devops/pipelines/build/triggers?view=azure-devops
trigger:
batch: false
branches:
include:
- main
# https://docs.microsoft.com/en-us/azure/devops/pipelines/repos/github?view=azure-devops&tabs=yaml#pr-triggers
pr:
autoCancel: false
branches:
include:
- main
stages:
- stage: Windows
jobs:
- job: Build
pool:
name: AzurePipelines-EO
demands:
- ImageOverride -equals AzurePipelinesWindows2022compliant
steps:
- checkout: self
clean: true
- task: NuGetAuthenticate@0
displayName: Authenticate NuGet feeds
inputs:
forceReinstallCredentialProvider: true
- task: MSBuild@1
displayName: Restore
inputs:
solution: Xamarin.CodeAnalysis.sln
configuration: Release
msbuildArguments: /t:restore /bl:"$(Build.ArtifactStagingDirectory)\restore.binlog"
- task: MSBuild@1
displayName: Build
inputs:
solution: Xamarin.CodeAnalysis.sln
configuration: Release
msbuildArguments: /bl:"$(Build.ArtifactStagingDirectory)\build.binlog" /p:TargetVsixContainer=$(Build.ArtifactStagingDirectory)\Xamarin.CodeAnalysis.vsix /m
- task: VSTest@2
displayName: Test
inputs:
testAssemblyVer2: src\*\bin\*\*.Tests.dll
runInParallel: 'true'
codeCoverageEnabled: 'true'
publishRunAttachments: 'true'
- task: PublishBuildArtifacts@1
displayName: Publish Artifact
inputs:
PathtoPublish: $(Build.ArtifactStagingDirectory)
ArtifactName: out
ArtifactType: Container
condition: always()