azure-pipelines.ix.yml 3.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116
  1. trigger:
  2. branches:
  3. include:
  4. - master
  5. - rel/*
  6. paths:
  7. include:
  8. - Ix.NET/Source/*
  9. - .editorconfig
  10. - azure-pipelines.ix.yml
  11. pr:
  12. branches:
  13. include:
  14. - master
  15. - rel/*
  16. - IxAsyncCSharp8
  17. paths:
  18. include:
  19. - Ix.NET/Source/*
  20. - .editorconfig
  21. - azure-pipelines.ix.yml
  22. pool:
  23. vmImage: windows-2019
  24. variables:
  25. BuildConfiguration: Release
  26. DOTNET_SKIP_FIRST_TIME_EXPERIENCE: true
  27. steps:
  28. - task: DotNetCoreInstaller@0
  29. inputs:
  30. version: '3.0.100-preview6-012264'
  31. - task: DotNetCoreCLI@2
  32. inputs:
  33. command: custom
  34. custom: tool
  35. arguments: install --tool-path . nbgv
  36. displayName: Install NBGV tool
  37. - script: nbgv cloud -p Ix.NET\Source
  38. displayName: Set Version
  39. - task: DotNetCoreCLI@2
  40. inputs:
  41. command: restore
  42. projects: Ix.NET/Source/**/*.csproj
  43. displayName: Restore
  44. - task: DotNetCoreCLI@2
  45. inputs:
  46. command: pack
  47. packagesToPack: Ix.NET/Source/**/System.Interactive*.csproj;Ix.NET/Source/**/System.Linq.*.csproj;!Ix.NET/Source/**/*.Tests*.csproj;!Ix.NET/Source/refs/**
  48. configuration: $(BuildConfiguration)
  49. packDirectory: $(Build.ArtifactStagingDirectory)\artifacts
  50. verbosityPack: Minimal
  51. displayName: Pack
  52. - task: DotNetCoreCLI@2
  53. inputs:
  54. command: custom
  55. custom: tool
  56. arguments: install --tool-path . dotnet-reportgenerator-globaltool
  57. displayName: Install ReportGenerator tool
  58. - task: DotNetCoreCLI@2
  59. inputs:
  60. command: test
  61. projects: Ix.NET/Source/**/*.Tests.csproj
  62. arguments: -c $(BuildConfiguration) -- RunConfiguration.DisableAppDomain=true
  63. displayName: Run Tests
  64. - script: reportgenerator -reports:$(Build.SourcesDirectory)/Ix.NET/Source/coverlet/raw/**/coverage.cobertura.xml -targetdir:$(Build.SourcesDirectory)/Ix.NET/Source/coverlet/reports -reporttypes:"Cobertura"
  65. displayName: Create reports
  66. - task: PublishCodeCoverageResults@1
  67. displayName: 'Publish code coverage'
  68. inputs:
  69. codeCoverageTool: Cobertura
  70. summaryFileLocation: $(Build.SourcesDirectory)/Ix.NET/Source/coverlet/reports/Cobertura.xml
  71. - task: DotNetCoreCLI@2
  72. inputs:
  73. command: custom
  74. custom: tool
  75. arguments: install --tool-path . Codecov.Tool
  76. displayName: Install Codecov tool
  77. condition: and(succeeded(), not(eq(variables['CODECOV_TOKEN'], '')))
  78. - script: codecov -f $(Build.SourcesDirectory)/Ix.NET/Source/coverlet/reports/Cobertura.xml --flag ixnet
  79. env:
  80. CODECOV_TOKEN: $(CODECOV_TOKEN)
  81. displayName: Upload coverage to Codecov
  82. condition: and(succeeded(), not(eq(variables['CODECOV_TOKEN'], '')))
  83. - task: PowerShell@2
  84. displayName: Authenticode Sign Packages
  85. inputs:
  86. filePath: Ix.NET/Source/build/Sign-Package.ps1
  87. env:
  88. SignClientUser: $(SignClientUser)
  89. SignClientSecret: $(SignClientSecret)
  90. ArtifactDirectory: $(Build.ArtifactStagingDirectory)\artifacts
  91. condition: and(succeeded(), not(eq(variables['build.reason'], 'PullRequest')), not(eq(variables['SignClientSecret'], '')), not(eq(variables['SignClientUser'], '')))
  92. - task: PublishPipelineArtifact@0
  93. inputs:
  94. targetPath: $(Build.ArtifactStagingDirectory)\artifacts
  95. artifactName: artifacts
  96. - task: PublishPipelineArtifact@0
  97. inputs:
  98. artifactName: Coverage Report XML
  99. targetPath: $(Build.SourcesDirectory)/Ix.NET/Source/coverlet/reports/Cobertura.xml