-
Notifications
You must be signed in to change notification settings - Fork 2
/
azure-pipelines.yml
50 lines (42 loc) · 1.29 KB
/
azure-pipelines.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
trigger:
- master
- releases/*
pr:
- master
- releases/*
pool:
vmImage: 'windows-2019'
variables:
- name: SOLUTION_NAME
value: 'PipelineFramework.DI.sln'
steps:
- task: DotNetCoreCLI@2
displayName: 'build all'
inputs:
command: build
projects: $(SOLUTION_NAME)
arguments: '-c release'
- task: DotNetCoreCLI@2
displayName: Test
inputs:
command: 'test'
projects: 'tests/**/*.Tests.csproj'
arguments: '--no-build --logger trx --results-directory $(Common.TestResultsDirectory) --collect:"Code Coverage" --configuration Release /property:langversion=latest'
publishTestResults: false
- task: PublishTestResults@2
inputs:
testResultsFormat: 'VSTest'
testResultsFiles: '$(Common.TestResultsDirectory)\*.trx'
- task: DotNetCoreCLI@2
displayName: 'dotnet pack'
condition: and(succeeded(), ne(variables['Build.Reason'], 'PullRequest'))
inputs:
command: pack
packagesToPack: '**/PipelineFramework.LightInject.csproj;**/PipelineFramework.Autofac.csproj'
configuration: release
packDirectory: '$(Build.ArtifactStagingDirectory)'
- task: PublishBuildArtifacts@1
displayName: 'Publish Artifact: drop'
condition: and(succeeded(), ne(variables['Build.Reason'], 'PullRequest'))
inputs:
PathtoPublish: '$(Build.ArtifactStagingDirectory)'