-
Notifications
You must be signed in to change notification settings - Fork 3
/
azure-pipelines.yml
44 lines (35 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
# ASP.NET
# Build and test ASP.NET projects.
# Add steps that publish symbols, save build artifacts, deploy, and more:
# https://docs.microsoft.com/azure/devops/pipelines/apps/aspnet/build-aspnet-4
pool:
vmImage: 'ubuntu-latest'
trigger:
batch: true
branches:
include: ['master']
variables:
buildConfiguration: 'Release'
workingDirectory: '$(Build.SourcesDirectory)'
solutionFile: './magnett-automation-core.sln'
pojectFile: '$(Build.SourcesDirectory)/src/Magnett.Automation.Core/Magnett.Automation.Core.csproj'
steps:
- script: dotnet restore $(solutionFile)
displayName: Restore
workingDirectory: $(workingDirectory)
- script: dotnet build $(solutionFile) --configuration $(buildConfiguration)
displayName: Build
workingDirectory: $(workingDirectory)
- script: dotnet test $(solutionFile) --configuration $(buildConfiguration) --logger trx
displayName: Test
workingDirectory: $(workingDirectory)
- task: PublishTestResults@2
displayName: Publish Test Results
condition: succeededOrFailed()
inputs:
testRunner: VSTest
testResultsFiles: '**/*.trx'
- script: dotnet publish $(pojectFile) --configuration $(buildConfiguration) --output $(Build.ArtifactStagingDirectory)
displayName: Publish
workingDirectory: $(workingDirectory)
- task: PublishBuildArtifacts@1