-
Notifications
You must be signed in to change notification settings - Fork 10
/
azure-pipelines.yml
73 lines (60 loc) · 2.05 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
# CarWash CI
# Docs: https://docs.microsoft.com/azure/devops/pipelines/languages/dotnet-core
trigger:
- master
- releases/*
pool:
vmImage: "vs2017-win2016"
variables:
buildConfiguration: "Release"
steps:
- task: DotNetCoreCLI@2
displayName: "Restore NuGet packages"
inputs:
command: restore
projects: "**/*.csproj"
- task: DotNetCoreCLI@2
displayName: "Build API ($(buildConfiguration))"
inputs:
command: build
projects: "**/CarWash.PWA.csproj"
arguments: "--configuration $(buildConfiguration)"
- task: NodeTool@0
displayName: "Install Node.js"
inputs:
versionSpec: "10.x"
- script: |
cd $(Build.SourcesDirectory)\CarWash.PWA\ClientApp
npm install
displayName: "Restore npm packages for PWA"
- script: |
cd $(Build.SourcesDirectory)\CarWash.PWA\ClientApp
npm run build
displayName: "Build PWA"
- task: DotNetCoreCLI@2
displayName: "Build Functions ($(buildConfiguration))"
inputs:
command: build
projects: "**/CarWash.Functions.csproj"
arguments: "--configuration $(buildConfiguration)"
- task: DotNetCoreCLI@2
displayName: "Run tests"
inputs:
command: test
projects: "**/*.Tests/*.csproj"
arguments: "--configuration $(buildConfiguration) --logger trx /p:CollectCoverage=true /p:CoverletOutputFormat=cobertura /p:Exclude=\"[*]CarWash.ClassLibrary.Migrations.*\""
- task: PublishCodeCoverageResults@1
displayName: 'Publish code coverage results'
inputs:
summaryFileLocation: $(Build.SourcesDirectory)\CarWash.PWA.Tests\coverage.cobertura.xml
reportDirectory: $(Build.SourcesDirectory)\CarWash.PWA.Tests
codecoverageTool: cobertura
- task: DotNetCoreCLI@2
displayName: "Publish build artifacts"
inputs:
command: publish
publishWebProjects: True
arguments: "--configuration $(BuildConfiguration) --output $(Build.ArtifactStagingDirectory)"
zipAfterPublish: True
- task: PublishBuildArtifacts@1
displayName: "Upload build artifact to file container"