forked from cradle77/AdvancedTestingDemo
-
Notifications
You must be signed in to change notification settings - Fork 0
/
azure-pipelines.yml
53 lines (43 loc) · 1.08 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
pool:
vmImage: 'windows-latest'
trigger:
branches:
exclude:
- '*'
variables:
solution: '**/*.sln'
buildPlatform: 'Any CPU'
buildConfiguration: 'Release'
steps:
- task: DotNetCoreCLI@2
displayName: Restore
inputs:
command: restore
projects: '$(solution)'
- task: DotNetCoreCLI@2
displayName: Build solution
inputs:
command: build
projects: '$(solution)'
arguments: '--configuration $(BuildConfiguration) --output $(build.artifactstagingdirectory)'
- task: PowerShell@2
displayName: Start sqllocaldb instance
inputs:
targetType: inline
script: >
sqllocaldb start MSSQLLocalDB
sqllocaldb info MSSQLLocalDB
- task: DotNetCoreCLI@2
displayName: Run Tests
inputs:
command: test
projects: |
**\*Tests*.csproj
arguments: '--configuration DbTest'
- task: DotNetCoreCLI@2
displayName: Publish
inputs:
command: publish
publishWebProjects: True
arguments: '--configuration $(BuildConfiguration) --output $(build.artifactstagingdirectory)/webapps'
zipAfterPublish: True