forked from AArnott/Xunit.StaFact
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathazure-pipelines.yml
97 lines (84 loc) · 2.82 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
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
trigger:
branches:
include: ["master"]
paths:
exclude: ["doc", "*.md", ".appveyor.yml", ".travis.yml"]
variables:
TreatWarningsAsErrors: true
DOTNET_SKIP_FIRST_TIME_EXPERIENCE: true
BuildConfiguration: Release
BuildPlatform: Any CPU
jobs:
- job: Windows
pool: Hosted VS2017
steps:
- script: |
dotnet tool install --tool-path . nbgv
.\nbgv cloud -p src
displayName: Set build number
condition: ne(variables['system.pullrequest.isfork'], true)
- task: DotNetCoreInstaller@0
displayName: Install .NET Core SDK 3.0
inputs:
packageType: sdk
version: 3.0.100-preview8-013656
- script: dotnet --info
displayName: Show dotnet SDK info
- task: DotNetCoreCLI@2
displayName: Restore
inputs:
command: restore
verbosityRestore: normal # detailed, normal, minimal
projects: src/**/*.sln
feedsToUse: config
nugetConfigPath: src/nuget.config
- task: DotNetCoreCLI@2
displayName: Build
inputs:
projects: src/**/*.sln
arguments: --no-restore -c $(BuildConfiguration)
- task: DotNetCoreCLI@2
displayName: Pack
inputs:
command: pack
projects: src/**/*.sln
configuration: $(BuildConfiguration)
nobuild: true
verbosityPack: normal
packDirectory: $(Build.ArtifactStagingDirectory)/deployables
- task: DotNetCoreCLI@2
displayName: Run tests
inputs:
command: test
projects: src/Nerdbank.Streams.Tests/Nerdbank.Streams.Tests.csproj
nobuild: true
arguments: --filter "TestCategory!=FailsInCloudTest" -v n
continueOnError: true # we have a lot of unit tests that are SUPPOSED to fail
- task: CopyFiles@1
inputs:
Contents: |
obj/**/project.assets.json
TargetFolder: $(Build.ArtifactStagingDirectory)/projectAssetsJson
displayName: Collecting project.assets.json artifacts
condition: succeededOrFailed()
## The rest of these steps are for deployment and skipped for PR builds
#- task: PublishBuildArtifacts@1
# inputs:
# PathtoPublish: $(build.sourcesdirectory)/bin
# ArtifactName: bin
# ArtifactType: Container
# condition: and(succeeded(), ne(variables['system.pullrequest.isfork'], true))
- task: PublishBuildArtifacts@1
inputs:
PathtoPublish: $(Build.ArtifactStagingDirectory)/projectAssetsJson
ArtifactName: projectAssetsJson
ArtifactType: Container
displayName: Publish projectAssetsJson artifacts
condition: and(succeededOrFailed(), ne(variables['system.pullrequest.isfork'], true))
- task: PublishBuildArtifacts@1
inputs:
PathtoPublish: $(Build.ArtifactStagingDirectory)/deployables
ArtifactName: deployables
ArtifactType: Container
displayName: Publish deployables artifacts
condition: and(succeeded(), ne(variables['system.pullrequest.isfork'], true))