mirror of
https://github.com/XFox111/SimpleOTP.git
synced 2026-04-22 08:00:45 +03:00
Set up CI with Azure Pipelines (#9)
This commit is contained in:
@@ -0,0 +1,66 @@
|
||||
# .NET Desktop
|
||||
# Build and run tests for .NET Desktop or Windows classic desktop solutions.
|
||||
# Add steps that publish symbols, save build artifacts, and more:
|
||||
# https://docs.microsoft.com/azure/devops/pipelines/apps/windows/dot-net
|
||||
|
||||
trigger:
|
||||
- master
|
||||
|
||||
pool:
|
||||
vmImage: 'windows-latest'
|
||||
|
||||
variables:
|
||||
buildPlatform: 'Any CPU'
|
||||
buildConfiguration: 'Release'
|
||||
|
||||
steps:
|
||||
- task: NuGetToolInstaller@1
|
||||
displayName: 'Install NuGet tools'
|
||||
|
||||
- task: NuGetCommand@2
|
||||
displayName: 'Restore NuGet packages'
|
||||
inputs:
|
||||
command: 'restore'
|
||||
restoreSolution: '**/*.sln'
|
||||
feedsToUse: 'select'
|
||||
|
||||
- task: VSBuild@1
|
||||
displayName: 'Build library'
|
||||
inputs:
|
||||
solution: '**/SimpleOTP.csproj'
|
||||
msbuildArgs: '/p:NoWarn=AD0001'
|
||||
platform: '$(buildPlatform)'
|
||||
configuration: '$(buildConfiguration)'
|
||||
msbuildArchitecture: 'x64'
|
||||
|
||||
- task: VSBuild@1
|
||||
displayName: 'Build tests'
|
||||
inputs:
|
||||
solution: '**\*.Test.csproj'
|
||||
|
||||
- task: VSTest@2
|
||||
displayName: 'Run tests'
|
||||
inputs:
|
||||
testSelector: 'testAssemblies'
|
||||
testAssemblyVer2: |
|
||||
**\*.Tests.dll
|
||||
!**\*TestAdapter.dll
|
||||
!**\obj\**
|
||||
!**\bin\**\ref\**
|
||||
searchFolder: '$(System.DefaultWorkingDirectory)'
|
||||
codeCoverageEnabled: true
|
||||
|
||||
- task: CopyFiles@2
|
||||
displayName: 'Copy file to staging'
|
||||
inputs:
|
||||
SourceFolder: '$(System.DefaultWorkingDirectory)'
|
||||
Contents: '**/Release/**/*.nupkg'
|
||||
TargetFolder: '$(Build.ArtifactStagingDirectory)'
|
||||
flattenFolders: true
|
||||
|
||||
- task: PublishBuildArtifacts@1
|
||||
displayName: 'Drop artifacts'
|
||||
inputs:
|
||||
PathtoPublish: '$(Build.ArtifactStagingDirectory)'
|
||||
ArtifactName: 'Artifacts'
|
||||
publishLocation: 'Container'
|
||||
Reference in New Issue
Block a user